perm filename LISP.RPG[UP,DOC] blob sn#331344 filedate 1978-01-26 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00058 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00004 00002	THURSDAY  JAN 26,1978  FM+2D.9H.23M.18S.  LISP 472  -GLS, HIC, JONL-
C00010 00003	FRIDAY  JAN 13,1978   NM+4D.23H.1M.55S.   LISP 383   -GLS, HIC-
C00037 00004	THURSDAY  JUNE 09,1977   LQ+1D.1H.47M.35S.   LISP 293   - GLS -
C00041 00005
C00053 00006
C00066 00007
C00078 00008
C00084 00009	TUESDAY  SEPT 14,1976   FM+6D.1H.33M.7S.   LISP 1211  -GLS,JONL-
C00101 00010	THURSDAY  JULY 01,1976   NM+4D.11H.48M.23S.  LISP 1168  - GLS -
C00111 00011	TUESDAY  JUNE 15,1976   FM+3D.2H.27M.33S.   LISP 1160  - GLS -
C00145 00012
C00184 00013
C00191 00014
C00208 00015
C00259 00016
C00281 00017	12/8/74  JONL & GLS 
C00285 00018	FRIDAY  SEPT 13,1974   LQ+4D.19H.41M.28S.   LISP 909  - GLS -
C00290 00019
C00298 00020
C00301 00021	FRIDAY  JULY 19,1974   NM+8H.29M.40S.   LISP 861   - GLS -
C00323 00022
C00342 00023	TUESDAY  APRIL 23,1974   NM+2D.8H.36M.6S.    LISP 810    - GLS -
C00369 00024	FRIDAY  MARCH 01,1974   FQ+18H.38M.31S.   LISP 767   - GLS -
C00381 00025	WEDNESDAY  FEB 13,1974   FM+7D.3H.28M.38S.   LISP 746   - GLS -
C00391 00026	WEDNESDAY  DEC 26,1973    NM+2D.6H.21M.49S.    LISP 707    - GLS -
C00405 00027	12/3/73  MONDAY DEC 03,1973	LISP 686	- GLS, JONL -
C00428 00028	MONDAY  OCT 15,1973	FM+4D.3H.22M.30S.	LISP 623	- GLS -
C00441 00029
C00451 00030
C00459 00031
C00469 00032
C00475 00033
C00482 00034
C00485 00035
C00494 00036
C00503 00037
C00511 00038	JONL 2/2/73
C00519 00039
C00535 00040
C00542 00041	  08/01/72  - GLS -
C00560 00042
C00569 00043
C00584 00044
C00592 00045
C00602 00046	4/5/72 - JONL-
C00610 00047	3/17/72  - JONL -
C00626 00048
C00636 00049
C00640 00050
C00657 00051
C00659 00052
C00663 00053
C00672 00054
C00680 00055	 5/15/71   -JONL-
C00695 00056
C00701 00057
C00706 00058	5/6/69 22:16  JONL
C00713 ENDMK
C⊗;
THURSDAY  JAN 26,1978  FM+2D.9H.23M.18S.  LISP 472  -GLS, HIC, JONL-

THINGS WE WOULD LIKE TO KNOW:
[A] INPUT/OUTPUT BASES DEFAULTING TO DECIMAL
[B] FUNCTION CELLS
[C] ERROR HANDLING
[D] DOTS IN DOTTED PAIRS REQUIRING A SPACE ON BOTH SIDES

CHANGES THAT AFFECT ALL VERSIONS:
[1] NEW SYNTACTIC CONSTRUCT: CASEQ
[2] *RSET DEFAULT IS NOW T
[3] CONS IS NOW AN LSUBR (!)
[4] LIMITATION ON LENGTH OF VALRET STRINGS HAS BEEN REMOVED

CHANGES THAT AFFECT SAIL VERSION:
[!] VALRET WILL NOW DO A PTLOAD, TO LOAD ARGUMENT INTO LINE EDITOR
--------------------------------------------------------------------
PLEASE ANSWER THE FOLLOWING QUESTIONS IF YOU FEEL THEY HAVE A
BEARING ON YOUR ACTIVTIES BY SENDING MAIL TO BUG-LISP:
[A] SHOULD THE DEFAULT BASE FOR INPUT AND OUTPUT BE DECIMAL?
    IF SO, WHAT SHOULD BE USED FOR AN OCTAL 'POINT'?

[B] WE ARE CONSIDERING IMPLEMENTING 'FUNCTION CELLS'.  THESE WOULD
    HOLD THE FUNCTIONAL PROPERTIES OF AN SYMBOL.  THIS CHANGE WOULD
    REMOVE THE ABILITY TO USE PUTPROP/DEFPROP/GET TO HACK FUNCTIONAL
    PROPERTIES.  SUGGESTIONS ARE SOLICITED.

[C] WE ARE ALSO CONSIDERING IMPROVING THE ERROR HANDLING FACILITIES
    AND WOULD APPRECIATE INPUT ON THE TYPES OF THINGS THAT ARE
    DESIRED.

[D] SHOULD THE DOT IN DOTTED PAIRS *REQUIRE* A SPACE ON EACH SIDE?
    IF NO SPACE WAS PRESENT THE DOT WOULD BE CONSIDERED EITHER A
    DECIMAL POINT OR PART OF A SYMBOL.

THE FOLLOWING APPLY TO ALL SYSTEMS:
[1] THERE IS A NEW TYPE OF CONDITIONAL NAMED 'CASEQ'.

    (CASEQ <KEY>
           (<KEY-SET> E1 E2 ... EN)	;CLAUSE 1
           (<KEY-SET> E1 E2 ... EN)	;CLAUSE 2
	       ...
	   (<KEY-SET> E1 E2 ... EN))	;CLAUSE M

    <KEY> MUST EVALUATE TO EITHER A SYMBOL OR A FIXNUM.
    ALL OF THE KEYS IN THE KEY-SETS MUST BE OF THE SAME TYPE,
    EITHER SYMBOL OR FIXNUM, AND <KEY> MUST BE OF THIS SAME TYPE
    ALSO.
    <KEY-SET> IS EITHER THE ATOM T, A RANDOM ATOM (SYMBOL OR FIXNUM),
    OR A LIST OF ATOMS (SYMBOLS OR FIXNUMS).  IF IT IS THE ATOM T,
    THE EXPRESSIONS FOLLOWNG IT ARE EVALUATED UNCONDITIONALLY.
    THIS SHOULD OCCUR ONLY IN THE LAST CLAUSE, IF AT ALL.
    IF <KEY-SET> IS A SINGLE ATOM (OTHER THAN T), THEN IF IT MATCHES
    <KEY> THE FOLLOWING EXPRESSIONS ARE EVALUATED.  IF A LIST OF ATOMS
    IS PRESENT, THEN EACH ATOM IS MATCHED AGAINST <KEY> AND THE
    EXPRESSIONS ARE EVALUATED IF ANY ATOM MATCHES.  THE ATOMS IN THE
    <KEY-SET> ARE NEVER EVALUATED.  "MATCHING" MEANS EQ FOR SYMBOLS
    AND = FOR FIXNUMS.
    THE VALUE OF CASEQ IS THE VALUE OF THE LAST EXPRESSION EVALUATED
    IF A MATCH IS FOUND, ELSE NIL.
    IT IS NOT USEFUL FOR A GIVEN KEY TO APPEAR MORE THAN ONCE AMONG
    ALL THE KEY-SETS OF A SINGLE CASEQ.  THE IDEA OF CASEQ IS TO
    PROVIDE A DISPATCHING CONSTRUCT.  A "T-CLAUSE" PROVIDES AN
    "ELSE" CASE FOR WHEN NO EXPLICITLY GIVEN KEYS MATCH.
    EVENTUALLY WE HOPE THAT CASEQ ON FIXNUMS, AT LEAST, WILL COMPILE
    ESPECIALLY WELL, INTO A KIND OF FORTRAN-STYLE COMPUTED GOTO.

[2] THE DEFAULT VALUE OF *RSET IS NOW T.

[3] CONS IS NOW AN LSUBR.
    (CONS A B C D) <==> (CONS A (CONS B (CONS C D)))
    (CONS A) <==> A
    IN OTHER WORDS, IT RIGHT-ASSOCIATES.
    (CONS A B C D NIL) = (LIST A B C D), BUT ON THE LISP MACHINE
    THEY MAY HAVE DIFFERENT CONNOTATIONS WITH RESPECT TO STORAGE
    ALLOCATION.

[4] THE LIMITATION ON THE LENGTH OF VALRET STRINGS HAS BEEN REMOVED
    FOR ALL PRACTICAL PURPOSES.

[!] IN SAIL VERSION, VALRETTING A STRING NOW LOADS THE STRING INTO
    THE LINE EDITOR VIA PTLOAD.
FRIDAY  JAN 13,1978   NM+4D.23H.1M.55S.   LISP 383   -GLS, HIC-

[@] SOME CHANGES IN NOMENCLATURE FOR VARIOUS VERSIONS

[1] LAST MOST FINAL DOCUMENTATION OF THE HAIRY DEFUN FEATURE
[2] (STATUS JNUMBER) RETURNS A JOB NUMBER
[3] NEW EDIT COMMAND:  YV FOO  YANKS VALUE OF FOO

[A] FILEPOS CAN TAKE T AND NIL AS POSITION SPECIFIERS
[B] MEANINGS OF T AND NIL WHERE A FILE OBJECT IS REQUIRED
[C] NEW IO-LOSSAGE ERROR FOR AN INVALID VALUE OF MSGFILES
[D] SLIGHT INCOMPATIBILITY: UREAD AND UFILE NOW RETURN A FULL NAMELIST
[E] UAPPEND NO LONGER RENAMES THE FILE ON OPENING IT
[F] FOR THE RECORD, COMPLETE DEFINITIONS OF OLDIO IN TERMS OF NEWIO
[G] RENAMEF AND DELETEF OF A FILE OBJECT NOW CLOSE THE FILE OBJECT
[H] ALL ITS NEWIO I/O IS NOW DONE WITH SIOT

SOME FEATURES PRESENTLY IMPLEMENTED ONLY FOR THE SAIL VERSION:
[!] SAIL VERSION NOW USES TWO SEPARATE DISK FILES FOR SAVED LISPS
["] INITIALIZATION AUTOMATICALLY SAVES A HIGH SEGMENT
[#] FASLOAD CAN LOAD INTO THE HIGH SEGMENT
[$] HIGH-SEGMENT PURE FREE STORAGE
[%] SUSPEND NOW TAKES ONE OR TWO ARGUMENTS

SOME THINGS PROBABLY OF INTEREST ONLY TO LISP SYSTEM HACKERS:
[{] NEW INTERNAL ROUTINES %CONS, %HUNK, ETC. SOLVE A PDLNMK PROBLEM
[|] INIT}G IS NOW INITIALIZE}G, TO PREVENT CONFLICT WITH DEC-10 INIT UUO
[}] NEW MACROS PUSHN AND POPI ARE USED IN THE SOURCE
[~] THE FORMAT OF FILE OBJECTS HAS CHANGED SOME - REASSEMBLE CODE IF NECESSARY
----------------------------------------------------------------
[@] THERE ARE MANY, MANY VERSIONS OF MACLISP FLOATING AROUND.
    EVEN JUST ON THE PDP-10, THERE ARE MANY BECAUSE OF THE
    POSSIBILITIES OF CONDITIONAL ASSEMBLY.  WORK IS PROCEEDING
    APACE ON VERSIONS FOR THE TENEX AND TOPS-20 OPERATING SYSTEMS,
    AND ON NEWIO VERSIONS FOR SAIL AND TOPS-10.  HERE WE LAY OUT
    SOME STANDARD NOMENCLATURE FOR THE VARIOUS VERSIONS.
    THE VARIOUS NAMES FALL INTO SETS WHICH REPRESENT ORTHOGONAL
    CHOICES.
	OPERATING SYSTEM:
			/	ITS
			|		/	TOPS-10
			|	DEC-10	|	SAIL
		PDP-10	|		\	CMU
			|		/
			|	DEC-20	|	TENEX
			\		\	TOPS-20 (AKA "TWENEX")
		MULTICS
    THE PDP-10 VERSION WILL EVENTUALLY RUN ON SIX DIFFERENT
    OPERATING SYSTEMS.  TOPS-10, SAIL, AND CMU ARE SUFFICIENTLY
    SIMILAR TO WARRANT LUMPING THEM TOGETHER AS "DEC-10"; SIMILARLY
    TENEX AND TOPS-20 ARE LUMPED TOGETHER AS "DEC-20".
    MULTICS, OF COURSE, IS NOT A PDP-10 VERSION.
	PROCESSOR:
		KA10
		KI10
		KL10
    THE KA10 VERSION WILL RUN ON ALL PROCESSORS; THE KI10 VERSION WILL
    RUN ONLY ON KI10 AND KL10 PROCESSORS; AND THE KL10 ONLY ON KL10'S.
    SO FAR WE HAVE BEEN GENERATING ONLY KA10 VERSIONS; WHEN THE NEW
    NUMBER STUFF IS IMPLEMENTED, THIS CHOICE WILL BECOME MORE IMPORTANT.
	I/O IMPLEMENTATION:
		OLDIO	(UREAD, UWRITE, ETC. *ONLY*)
		NEWIO	(MULTIPLE I/O CHANNELS; ALSO SUPPORTS UREAD)
	MINIMALITY:
		MINIMAL	(FANCY FRILLS NOT INCLUDED)
		USELESS	(FANCY "USELESS" FRILLS ARE INCLUDED)
    THE FRILLS INCLUDE THE GCD FUNCTION, PURIFY AND FRIENDS, AND LOTS
    OF LITTLE I/O HACKS LIKE ROMAN NUMERALS AND PRINLEVEL/PRINLENGTH.
    THE MINIMAL VERSION IS USUALLY USED ONLY FOR DEC-10 VERSIONS
    WHICH MUST RUN ON MACHINES WITH LITTLE PHYSICAL MEMORY; HOWEVER,
    IT IS AN OPTION INDEPENDENT OF OPERATING SYSTEM.
	ARITHMETIC:
		BIGNUMS
		DOUBLE-PRECISION FLONUMS
		COMPLEX NUMBERS
    THESE THREE ARE INDEPENDENT CHOICES WHICH MAY BE PRESENT OR ABSENT.

    THUS, TO IDENTIFY THE VERSION PRESENTLY RUNNING AT MIT-AI, WE
    MIGHT SAY "THE ITS KA10 NEWIO USELESS BIGNUM VERSION".


[1] THE FOLLOWING ARE THE OFFICIAL SPECS FOR THE "HAIRY DEFUN"
    FEATURE, WHEREIN THE NAME OF THE FUNCTION IS ACTUALLY
    A LIST OF GOODIES.  IF THE INTERPRETER OR COMPILER DOESN'T
    ACTUALLY DO WHAT FOLLOWS, IT'S A BUG.  (UP TO NOW WE HAVEN'T
    BEEN ABLE TO DISTINGUISH BUGS AND MISFEATURES BECAUSE WE
    WEREN'T SURE PRECISELY WHAT THE FEATURE SHOULD DO IN ALL CASES.)

    THE GENERAL FORM OF A CALL TO DEFUN IS:
	(DEFUN <SPEC> <FLAG> <ARGS> . <BODY>)
    <SPEC> AND <FLAG> MAY BE INTERCHANGED.
    <FLAG> MAY BE OMITTED, OR MAY BE "EXPR", "FEXPR", OR "MACRO".
    <SPEC> MAY BE A SYMBOL (THE NAME OF THE FUNCTION), OR
    A LIST OF TWO TO FOUR SYMBOLS (IN WHICH CASE THE FLAG "MACRO"
    IS ILLEGAL).  <ARGS> IS A NON-NIL SYMBOL OR A LIST OF SYMBOLS;
    THE FORMER INDICATES AN LEXPR (INCOMPATIBLE WITH THE "MACRO"
    AND "FEXPR" FLAGS).
    IF THE VALUE OF THE SWITCH DEFUN IS T, THEN THE EXPR-HASH HACK
    IS ENABLED.  IN THIS CASE, DEFUN AVOIDS MAKING THE INTERPRETIVE
    DEFINITION IF HASHING THE DEFINITION INDICATES THAT IT IS
    THE SAME AS THE CURRENT, PRESUMABLY COMPILED, DEFINITION.
    THE VARIOUS CASES ARE:
    FORM OF <SPEC>:
   	FOO		(FOO BAR)	(FOO BAR BAZ)	(FOO BAR BAZ QUUX)
    EXPR-HASH PROPERTY IS ON THE ATOM:
   	FOO		THE RESULT OF	  - NONE -	FOO
			(GET 'FOO 'BAR)
   			IF THIS IS A SYMBOL
    EXPR-HASH PROPERTY INDICATOR IS:
   	EXPR-HASH	EXPR-HASH	  - NONE -	QUUX
    DEFUN PUTS THE FUNCTION DEFINITION ON FOO UNDER THE PROPERTY:
   	EXPR/FEXPR/MACRO   BAR		BAR		BAR
    COMPILER PUTS THE FUNCTION DEFINITION ON FOO UNDER THE PROPERTY:
   	SUBR/FSUBR/LSUBR   BAR *	BAZ		BAZ
    * THE PROPERTY WILL BE A SYMBOL |FOO BAR| WHICH IN TURN
    WILL HAVE THE APPROPRIATE SUBR/FSUBR/LSUBR PROPERTY.

[2] (STATUS JNUMBER) RETURNS THE NUMBER OF THE LISP JOB (AS DEFINED
    BY THE HOST OPERATING SYSTEM).

[3] THE EDITOR COMMAND  YV FOO  IS THE SAME AS  YP FOO VALUE }}.
    IT IS USEFUL FOR EDITING THE VALUE OF A SYMBOL.

[A] T AND NIL AS THE SECOND ARGUMENT TO FILEPOS HAVE SPECIAL
    MEANINGS.  T MEANS THE END OF THE FILE, AND NIL MEANS
    THE ACTUAL BEGINNING OF THE FILE.  THE DIFFERENCE BETWEEN
    NIL AND 0 IS THAT 0 MEANS THE LOGICAL BEGINNING OF THE FILE,
    WHILE NIL MEANS THE PHYSICAL BEGINNING.  THIS MAKES NO
    DIFFERENCE IN ANY CURRENT IMPLEMENTATION, BUT WILL MAKE
    A DIFFERENCE WHEN SAIL NEWIO EXISTS.  FILEPOS WILL KNOW
    ABOUT THE SAIL RECORD OFFSET FEATURE, AND NIL WILL MEAN
    THE APPROPRIATE NEGATIVE RECORD NUMBER.

[B] THERE ARE THREE KINDS OF CONTEXTS IN WHICH A FILE OBJECT
    CAN BE USED:
    (1) AN INPUT FILE IS NEEDED, E.G. FOR READ AND TYI.
    (2) AN OUTPUT FILE IS NEEDED, E.G. FOR PRINT AND TYO.
    (3) EITHER DIRECTION IS ACCEPTABLE, E.G. FOR LINEL AND (STATUS TTYCONS).
    IN THE PAST T HAS MEANT THE TTY (THE TERMINAL).  UNFORTUNATELY,
    THERE IS AN AMBIGUITY IN CONTEXT (3).  TO ALLEVIATE THIS, WE
    ARRANGED FOR THE VARIABLES TYI AND TYO TO CONTAIN THE FILES
    USED FOR THE TTY (AS ALREADY DOCUMENTED), SO THAT THE USER
    CAN REFER TO THESE VARIABLES IN CONTEXT (3).  MOREOVER,
    IN CONTEXTS (1) AND (2) T IS TAKEN TO MEAN "THE FILE IN
    THE VARIABLE TYI OR TYO (RESPECTIVELY)".
    A PREVIOUSLY UNDOCUMENTED FEATURE OF THIS IS THAT MSGFILES,
    FOR EXAMPLE, CAN BE '(T) (WHICH IS IN FACT THE DEFAULT VALUE),
    WHICH CAUSES MESSAGES TO GO TO WHATEVER FILE IS IN TYO.
    IN THIS WAY ONE NEED NOT CHANGE MSGFILES JUST BECAUSE THE VALUE
    OF TYO IS CHANGED.
    WE NOW ALSO MAKE THE FURTHER EXTENSION THAT IN CONTEXT (2),
    WHERE ↑W WOULD BE HEEDED IF A FILE ARGUMENT WERE OMITTED,
    THAT SPECIFYING THE FILE EXPLICITLY (BY REFERRING TO THE VALUE
    OF TYO) WILL NOT HEED ↑W, BUT SPECIFYING T WILL ALLOW ↑W TO
    FORCE THE FILE IN TYO TO BE IGNORED.  THIS, FOR EXAMPLE,
    ALLOWS ↑W TO SUPPRESS MSGFILES ACTIVITY TO THE TTY AND WELL AS
    ORDINARY ACTIVITY.
    NIL AS A FILE MEANS DIFFERENT THINGS IN DIFFERENT CONTEXTS.
    IN CONTEXTS (1) AND (2) IT MEANS THE SAME AS SPECIFYING
    NO FILE ARGUMENT AT ALL, AND SO USES THE DEFAULT (INFILE FOR
    CONTEXT (1), OUTFILES AND TYO AS CONTROLLED BY ↑R AND ↑W FOR
    CONTEXT (2)).  FOR CONTEXT (3) IT MEANS "SET A DEFAULT VALUE"
    IF THAT IS APPROPRIATE (E.G. FOR LINEL), AND IS ILLEGAL IF NOT
    APPROPRIATE.

[C] IF MSGFILES IS EVER FOUND TO HAVE A BAD VALUE, AND IO-LOSSAGE
    ERROR OCCURS, SIMILAR TO THE FAIL-ACT ERRORS FOR BAD VALUES
    OF BASE, IBASE, ETC.  BEFORE THE ERROR OCCURS, MSGFILES IS
    SET TO '(T).

[D] UREAD AND UFILE NOW HAVE AS THEIR VALUE A FULL NAMELIST, NOT
    JUST THE SIMPLE FILE NAMES.  THUS UREAD MIGHT RETURN
    ((DSK LOSER) FOO BAR) WHERE FORMERLY IT WOULD HAVE RETURNED
    (FOO BAR).

[E] UAPPEND NO LONGER RENAMES THE OPENED FILE TO ".LISP. APPEND";
    THE FILE RETAINS ITS OWN NAME.  (THIS IS PRIMARILY BECAUSE
    IT IS SO DIFFICULT TO RENAME AN OPEN FILE ON TOPS-10 - GRR!).

[F] HERE ARE THE OFFICIAL DEFINITIONS OF THE OLDIO FUNCTIONS
    IN TERMS OF NEWIO FUNCTIONS:

	(DEFUN UREAD FEXPR (FILENAME)
	       (UCLOSE)
	       ((LAMBDA (FILE)
			(EOFFN UREAD
			       (FUNCTION
				  (LAMBDA (EOFFILE EOFVAL)
					  (UCLOSE)
					  EOFVAL)))
			(INPUSH (SETQ UREAD FILE))
			(DEFAULTF FILE))
		(OPEN (*UGREAT FILENAME) 'IN)))

	(DEFUN UCLOSE FEXPR (X)
	       (COND (UREAD
		      ((LAMBDA (OUREAD)
				(AND (EQ OUREAD INFILE) (INPUSH -1))
				(SETQ UREAD NIL)
				(CLOSE OUREAD))
			   UREAD))
		     (T NIL)))

	(DEFUN UWRITE FEXPR (DEVDIR)
	       (OR DEVDIR (SETQ DEVDIR (CAR (DEFAULTF NIL))))
	       (*UWRITE (CONS DEVDIR
			      (COND ((STATUS FEATURE DEC10)
				     (CONS (STATUS JNAME) '(OUT)))
				    ((STATUS FEATURE DEC20)
				     '(MACLISP OUTPUT))
				    ((STATUS FEATURE ITS)
				     '(.LISP. OUTPUT))))
			'OUT
			(LIST DEVDIR)))

	(DEFUN UAPPEND FEXPR (FILENAME)
	       (SETQ FILENAME (*UGREAT FILENAME))
	       (*UWRITE FILENAME 'APPEND FILENAME))

	(DEFUN *UWRITE (NAME MODE NEWDEFAULT)	;INTERNAL ROUTINE
	       (COND (UWRITE
		      (SETQ OUTFILES (DELQ UWRITE OUTFILES))
		      (CLOSE UWRITE)
		      (SETQ UWRITE NIL)))
	       ((LAMBDA (FILE)
			(SETQ OUTFILES
			      (CONS (SETQ UWRITE FILE)
				    OUTFILES))
			(CAR (DEFAULTF NEWDEFAULT)))
		(OPEN NAME MODE)))

	(DEFUN UFILE FEXPR (SHORTNAME)
	       (COND ((NULL UWRITE)
		         (ERROR 'NO/ UWRITE/ FILE
				(CONS 'UFILE SHORTNAME)
				'IO-LOSSAGE))
		     (T (PROG2 NIL
			       (DEFAULTF (RENAMEF UWRITE (*UGREAT SHORTNAME)))
			       (SETQ OUTFILES (DELQ UWRITE OUTFILES))
			       (SETQ UWRITE NIL)
			       (OR OUTFILES (SETQ ↑R NIL))))))

	(DEFUN *UGREAT (NAME)		;INTERNAL ROUTINE
	       (MERGEF NAME
		       (COND ((STATUS FEATURE DEC10) '(* . LSP))
			     ((STATUS FEATURE DEC20) '(* MACLISP *))
			     ((STATUS FEATURE ITS) '(* . >)))))

	(DEFUN UPROBE FEXPR (FILENAME)
	       (SETQ FILENAME (MERGEF (*UGREAT FILENAME) NIL))
	       (PROBEF FILENAME))

	(DEFUN UKILL FEXPR (FILENAME)
		    (DEFAULTF (DELETEF FILENAME))))


[G] FOR CONSISTENCY WITH TOPS-10 (SIGH), THE NEWIO FUNCTIONS
    DELETEF AND RENAMEF WHEN APPLIED TO A FILE OBJECT WILL
    ALSO CLOSE THE FILE OBJECT.

[H] IN CASE ANYONE CARES, ALL ITS NEWIO I/O TRANSACTIONS ARE
    NOW DONE WITH SIOT, NOT WITH BLOCK IOT.  THIS MAY AFFECT
    INTERACTIONS WITH FILES WRITTEN BY PROGRAMS WHICH STILL
    USE BLOCK IOT (E.G. ↑C PADDING AT ENDS OF FILES).

THE FOLLOWING FEATURES EXIST ONLY IN THE SAIL VERSION.
EVENTUALLY THEY WILL BE IMPLEMENTED IN ALL DEC-10 VERSIONS.
SOME OF THESE PROVIDE ABILITIES ANALOGOUS TO, BUT NOT
IDENTICAL WITH, FEATURES ALREADY PROVIDED ON ITS FOR HACKING
SHARABLE CODE AND DATA.  SYSTEMS PROGRAMMERS SHOULD EXAMINE
THE FOLLOWING DESCRIPTIONS TO SEE HOW TO HANDLE THESE
FEATURES IN A MANNER COMPATIBLE WITH ALL VERSIONS.
AT THE END IS AN EXAMPLE OF HOW TO CREATE A SHARED SYSTEM
IN A WAY THAT WILL WORK IN ALL EXISTING PDP-10 VERSIONS.

[!] THE SAIL (SU-AI) TIME-SHARING SYSTEM ORDINARY SAVES
    TWO-SEGMENT PROGRAMS AS A SINGLE FILE, UNLIKE TOPS-10,
    WHICH USES TWO DISTINCT DISK FILES (ONE FOR EACH
    SEGMENT).  MACLISP NOW GOES TO SOME TROUBLE TO USE TWO
    DISTINCT FILES ON SAIL ALSO.  THE HIGH-SEGMENT FILE
    NORMALLY HAS THE EXTENSION ".SHR".  THIS IS USED TO
    SUPPORT THE OTHER FEATURES BELOW. THE FILENAME FOR THE .SHR
    FILE IS THE FILENAME OF THE .REL FILE WHICH PRODUCED IT.
 
["] WHEN A NEW MACLISP HAS BEEN ASSEMBLED, LOADED, AND
    STARTED BY THE SU-AI MAINTAINER, IT WILL AUTOMATICALLY
    TRY TO DUMP OUT THE HIGH SEGMENT AS A DISK FILE,
    AND WILL PRINT A MESSAGE REGARDING SUCCESS OR FAILURE.
    IT THEN LOADS THE LINE EDITOR WITH AN APPROPRIATE
    SAVE COMMAND (NOT SSAVE, BECAUSE ONLY THE LOW SEGMENT
    SHOULD BE SAVED) FOR THE USER TO APPROVE WITH "RETURN"
    IF DESIRED.  (IF THE MAINTAINER WANTS TO USE NON-STANDARD
    FILE NAMES, HE CAN DEPOSIT THE NAMES IN LOCATIONS
    SGADEV, SGANAM, SGAEXT, AND SGAPPN.) THE LINE EDITOR IS LOADED WITH:
    SAVE SYS:MACLSP, WHICH CAN BE ALTERED.

[#] FASLOAD CAN NOW LOAD CODE INTO THE HIGH SEGMENT.
    RECALL THAT IN THE ITS VERSION, THE VARIABLE "PURE"
    CONTROLS THE LOADING OF PURIFIABLE (SHARABLE) CODE.
    THE MEANING OF THIS VARIABLE HAS BEEN EXTENDED.
    IF PURE IS A FIXNUM, THEN FASLOAD WILL SET UP FOR
    THE UUOLINKS HACK.  THE EXTENSION IS TWOFOLD:
    (1) IF THE ABSOLUTE VALUE OF PURE IS LESS THAN 10,
    IT IS MULTIPLIED BY 1024. (1K).  (2) THE ABSOLUTE
    VALUE OF THE RESULT IS AN ESTIMATE OF THE NUMBER
    OF *WORDS* DESIRED FOR THE UUOLINKS HACK.  THIS SHOULD
    BE ABOUT 15% MORE THAN THE TOTAL NUMBER OF DIFFERENT
    COMPILED FUNCTIONS TO BE LOADED.  (STEP 1 IS FOR
    COMPATIBILITY WITH THE OLD MEANING OF PURE, AS THE
    NUMBER OF 1K BLOCKS TO RESERVE.)
    IN THE ITS (AND DEC-20) VERSIONS, THE SIGN OF THE
    FIXNUM IS IRRELEVANT.  FOR SAIL (AND EVENTUALLY TOPS-10
    AND CMU), THE SIGN CONTROLS WHICH SEGMENT TO LOAD INTO.
    A POSITIVE VALUE LOADS INTO THE LOW SEGMENT, AS BEFORE.
    A NEGATIVE VALUE CAUSES THE HIGH SEGMENT TO BE
    DEPURIFIED (A WRITABLE COPY MADE) IF NECESSARY;
    THE CODE IS THEN LOADED INTO THE HIGH SEGMENT.
    ALSO, ONLY ONE OF THE UUOLINKS AREAS IS MADE IN THE
    LOW SEGMENT; THE OTHER IS PUT IN THE HIGH SEGMENT.
    (THUS THE HIGH-SEGMENT LOADING FEATURE IS TIED TO THE
    UUOLINKS FEATURE - SORRY ABOUT THAT.)

[$] RECALL THAT *PURE CONTROLS WHETHER CERTAIN KINDS OF
    S-EXPRESSIONS ARE TO BE AUTOMATICALLY PURCOPY'D.
    FOR ITS (AND DEC-20) ALL THAT MATTERS IS WHETHER IT IS
    NIL OR NON-NIL.  FOR SAIL (AND EVENTUALLY TOPS-10 AND CMU),
    IT MUST BE A FIXNUM TO CAUSE PURCOPY TO USE THE HIGH
    SEGMENT.  THIS IN TURN WORKS ONLY IF PURE IS A NEGATIVE
    FIXNUM.
    THE VALUE OF *PURE SHOULD BE AN ESTIMATE OF THE TOTAL
    NUMBER OF WORDS OF PURE FREE STORAGE NEEDED, INCLUDING ALL
    THAT LOADED BY PREVIOUS FILES AND ALL THAT INCLUDED IN
    THE INITIAL LISP SYSTEM (PRESENTLY ABOUT 6000. WORDS).
    THIS CAUSES FASLOAD TO PREALLOCATE ENOUGH ADDITIONAL ROOM
    IN THE HIGH SEGMENT TO ACCOMODATE THE ESTIMATED TOTAL AMOUNT
    OF PURE STORAGE.  (THE PREALLOCATION IS NECESSARY BECAUSE
    IT ISN'T POSSIBLE TO ALLOCATE LIST STORAGE IN THE HIGH
    SEGMENT ONCE THE LOADING OF CODE HAS BEGUN.)  MAKING THE
    ESTIMATE IN *PURE TOO BIG MERELY WASTES SPACE IN THE
    HIGH SEGMENT; MAKING IT TOO SMALL CAUSES PURCOPY TO MAKE
    ITS COPIES IN THE LOW SEGMENT.

[%] ONCE CODE AND DATA HAS BEEN LOADED INTO THE HIGH SEGMENT,
    ONE CAN USE SUSPEND TO REPURIFY AND DUMP IT.  IF SUSPEND
    IS GIVEN TWO ARGUMENTS, IT WILL TAKE THE SECOND AS A FILE
    NAME, DUMP THE HIGH SEGMENT TO THAT FILE, AND EXPUNGE THE
    HIGH SEGMENT.  IT THEN RETURNS TO MONITOR LEVEL.  (THE SAIL
    VERSION ALSO LOADS THE FIRST ARGUMENT INTO THE LINE
    EDITOR; THIS WILL NORMALLY BE A SAVE (NOT SSAVE) COMMAND.)
    WHEN THE LOW SEGMENT IS SUBSEQUENTLY CONTINUED OR RUN
    FROM THE SAVE FILE, IT WILL ATTACH TO A HIGH SEGMENT
    MADE FROM THE SAVED HIGH-SEGMENT FILE.  IN SO DOING IT
    WILL ARRANGE TO SHARE THAT HIGH SEGMENT WITH OTHER LISPS
    USING THAT SAME HIGH SEGMENT.

CHANGES OF INTEREST TO LISP SYSTEM HACKERS:
[{] THERE WAS A BUG WHICH OCCURRED BECAUSE CONS (AND HUNK) DID NOT
    PDLNMK ITS ARGUMENTS.  THIS WAS CONSIDERED OKAY BECAUSE NCOMPLR
    KNOWS ABOUT THESE SPECIALLY, AND KNOWS THAT THEY MUST NOT BE
    GIVEN UNSAFE ARGUMENTS.  HOWEVER, IT WAS POSSIBLE TO USE FUNCALL
    (OR SUBRCALL!) TO GIVE THEM UNSAFE ARGUMENTS.  THE SOLUTION
    WAS TO MAKE CONS AND HUNK ALWAYS PDLNMK, AND TO HAVE SPECIAL
    ROUTINES %CONS, %NCONS, %XCONS, %HUNK3, AND %HUNK4, WHICH ARE
    CALLED BY JSP T, AND WHICH NCOMPLR KNOWS ABOUT.  THESE EXPECT
    SAFE ARGUMENTS AND DO NOT PDLNMK.

[|] INIT$G IS NOW INITIALIZE$G, TO PREVENT CONFLICT WITH DEC-10 INIT UUO.

[}] THE MACRO  PUSHN PDL,N  PUSHES N WORDS OF ZEROS ONTO PDL.  THIS WORKS
    FOR ANY N; THE MACRO KNOWS ABOUT THE ROUTINES NPUSH, 0PUSH, AND
    0.0PUSH AND GENERATES THE APPROPRIATE CALLS.  THE MACRO IMPLICITLY
    DESTROYS T.
    THE MACRO  POPI PDL,N  POPS N WORDS FROM PDL BY SUBTRACTING AN
    APPROPRIATE LITERAL.  THE MACRO KNOWS ABOUT LOCATION R70.

[~] THE FORMAT OF FILE OBJECTS HAS BEEN CHANGED TO ACCOMODATE NEW INFORMATION.
    SOME EXTRA RESERVED SLOTS HAVE BEEN CREATED FOR FUTURE EXPANSION.
    IN PARTICULAR, NOTICE J.UIND (USER INDEX) FOR JOB ARRAYS, AND
    FB.BVC (VALID CHARACTER COUNT) FOR FILE OBJECTS.
THURSDAY  JUNE 09,1977   LQ+1D.1H.47M.35S.   LISP 293   - GLS -

[1] EVALHOOK NEVER SEES THE ARRAY REFERENCE OF A STORE

[A] THE DEFAULT ##MORE## PROCESSOR NOW DOES (NOINTERRUPT NIL)
[B] CHANGES TO ALLFILES:
	[B1] NAMESTRINGS ARE NOW ILLEGAL - USE NAMELISTS OR FILES
	[B2] NEW OPTIONS: BITS, CHARACTERS, BYTES, BYTESIZE
----------------------------------------------------------------
[1] TO PREVENT A PECULIAR SCREW INVOLVING THE PARTICULARLY KLUDGY
    IMPLEMENTATION OF STORE, THE EVALHOOK FUNCTION (IF ANY) WILL
    NEVER SEE THE ARRAY REFERENCE ITSELF AS A HOOKED FORM.  INSTEAD,
    IT WILL SEE ONLY SUBFORMS OF THE ARRAY REFERENCE.

[A] MY FACE IS RED.  TIME AND AGAIN I HAVE WARNED THAT ASYNCHRONOUS
    INTERRUPTS ARE ALWAYS RUN BY THE SYSTEM IN (NOINTERRUPT T) MODE
    TO PREVENT TIMING BUGS.  IT IS UP TO THE INTERRUPT FUNCTION TO
    RE-ENABLE INTERRUPTS BY SAYING (NOINTERRUPT NIL) IF DESIRED.
    THE SYSTEM-SUPPLIED ##MORE## PROCESSOR NOW DOES (NOINTERRUPT NIL)
    SO THAT IF YOU TYPE ↑G (QUIT) OR ANY OTHER INTERRUPT CHARACTER AT
    IT THE INTERRUPT WILL GO THROUGH IMMEDIATELY.

[B] CHANGES TO THE ALLFILES PACKAGE, WHICH INCLUDES THE FUNCTIONS
    ALLFILES, MAPALLFILES, DIRECTORY, AND MAPDIRECTORY:
	[B1] TO PREVENT A REOCCURRENCE OF THE RECENT DISASTER IN
	     WHICH SOMEONE DID
		(MAPALLFILES 'DELETEF '((DSK LOSER) * *))
	     AND DELETED 1/3 OF ALL OF MC'S FILES BEFORE IT WAS STOPPED,
	     ALLFILES AND RELATED FUNCTIONS WILL NOT ACCEPT NAMESTRINGS
	     ANY MORE.  (RRECALL THAT THE FILESPEC ARGUMENT IS A
	     LIST OF FILESPECS; THE TRAP IS THAT ERRONEOUSLY FEEDING
	     IT A SINGLE NAMELIST WILL MAKE IT THINK IT IS GETTING A
	     LIST OF NAMESTRINGS.)  NAMELISTS AND FILE OBJECTS ARE STILL
	     ACCEPTABLE.  IF YOU REALLY WANT TO ALLOW NAMESTRINGS, YOU
	     CAN ALWAYS SAY
		(ALLFILES (MAPCAR 'NAMELIST FOO) ...)
	     AND BE VERY, VERY, VERY, VERY, VERY, VERY CAREFUL!
	[B2] NEW OPTIONS ACCEPTED BY THE DIRECTORY AND MAPDIRECTORY FUNCTIONS:
		BITS		THE NUMBER OF BITS IN THE FILE
		BYTES		THE NUMBER OF BYTES IN THE FILE
		BYTESIZE	THE SIZE OF THE BYTES
		CHARACTERS	THE NUMBER OF CHARACTERS IN THE FILE
				(THIS IS AN OLD OPTION, BUT NOW IT
				YIELDS THE CORRECT CHARACTER COUNT RATHER
				THAN ROUNDING UP TO A MULTIPLE OF FIVE)

MONDAY  MAY 16,1977  LQ+6D.8H.0M.26S.   LISP 1272   - GLS -

I BELIEVE THAT I HAVE FINALLY KILLED THE GC BUG THAT WAS
CAUSING THE TOPS-10 IMPLEMENTATION TO GET MPV ON STARTUP.
NUMEROUS OTHER BUGS HAVE BEEN KILLED ALSO.

AS ALWAYS, NUMBERED ITEMS ARE FOR ALL LISPS, AND LETTERED
ONES FOR NEWIO ONLY.  THE OTHERS ARE IN NON-STANDARD CATEGORIES.

[1] THE VALUE OF HUNKP CONTROLS PRINT, PURCOPY, AND EQUAL
[2] PURE HUNKS EXIST (PURCOPY WILL WIN ON HUNKS)
[3] NEW PREDICATE: SYMBOLP
[4] CHANGES TO RANDOM; ALSO ([S]STATUS RANDOM).
[5] WARNING ABOUT MOST NEGATIVE NUMBER (THE "SETZ" PROBLEM)
[6] +, +$, AND THE LIKE NEVER DETECT OVERFLOW OR UNDERFLOW
[7] FLONUM OUTPUT HAS BEEN IMPROVED
[8] SQRT HAS BEEN IMPROVED
[9] VALUE OF FASLOAD IS NOW THE FUNCTION PROPERTIES TO CHECK

[A] NEW FUNCTION: FILEP
[B] FOR INFERIOR JOB HACKERS: JOBS CAN HAVE "PROPERTY LISTS"
[C] ASCII MODE I/O TO AND FROM INFERIORS IS PRESENTLY BROKEN

[&] THE NEW FUNCTION LH| PERFORMS A COMPLETELY WEIRD CROCK FOR LH

[;] THE SEGMENT TABLE BITS $FXP AND $FLP HAVE BEEN CHANGED
----------------------------------------------------------------
[1] THE VARIABLE HUNKP (INITIALLY T), IF NIL, CAUSES THE FUNCTIONS
    PRINT, EQUAL, AND PURCOPY TO TREAT HUNKS AS LISTS (AS MOST
    OTHER SYSTEM FUNCTIONS DO).  IF NON-NIL, THEN THESE THREE
    FUNCTIONS WILL TREAT THE HUNNKS AS HUNKS; IN PARTICULAR,
    EQUAL WILL COMPARE THE HUNKS ELEMENT-BY-ELEMENT.

[2] PURE HUNKS EXIST (PURCOPY WILL WIN ON HUNKS).  THIS JUST FILLS
    IN A TRIVIAL HOLE THAT I DIDN'T GET AROUND TO IMPLEMENTING
    EARLIER.  (STATUS PURSPCNAMES) WILL REFLECT THE PRESENCE
    OF THIS FEATURE.

[3] (SYMBOLP X) IS NON-NIL IFF X IS AN ATOMIC SYMBOL.
    THIS CATEGORY INCLUDES NIL; THAT IS, (SYMBOLP 'NIL) => T.

[4] THE RANDOM FUNCTION NOW HAS BETTER BEHAVIOR.  THE TWO-ARGUMENT
    FORM HAS BEEN ELIMINATED (WHICH USED TO INITIALIZE THE GENERATOR),
    SINCE THE STATE CANNOT BE CONTAINED IN TWO FIXNUMS ANY MORE.
    A NEW STATUS FUNCTION EXISTS FOR THIS PURPOSE.
    (STATUS RANDOM) RETURNS A LIST WHICH SUMMARIZES THE STATE
    OF THE RANDOM NUMBER GENERATOR.  NO GUARANTEES ARE MADE AS TO
    ITS FORMAT, EXCEPT THAT IT MAY BE FED AS AN ARGUMENT X TO
    (SSTATUS RANDOM X), WHICH WILL RESTORE THE GENERATOR TO THAT
    FROZEN STATE.  (SSTATUS RANDOM N) FOR ANY FIXNUM N IS ALSO
    PERMISSIBLE; THIS WILL INITIALIZE THE GENERATOR IN A WAY THAT
    DEPENDS IN AN UNSPECIFIED WAY ON N.  (THIS IS SO THAT PEOPLE
    CAN DO, FOR EXAMPLE, (SSTATUS RANDOM (TIME)) OR SOMETHING.)

[5] THE PDP-10 HARDWARE (BOTH KA10 AND KL10) HAS A WEIRD GLITCH TO
    THE EFFECT THAT IT FAILS TO DIVIDE THE MOST NEGATIVE FIXNUM
    (-400000000000) BY 1 CORRECTLY, EVEN THOUGH THE RESULTS ARE
    WELL-DEFINED AND REPRESENTABLE.   THE GENERIC FUNCTIONS
    (QUOTIENT, *QUO, REMAINDER) HAVE BEEN FIXED TO COMPENSATE FOR
    THIS PROBLEM; THEY ARE CONCEPTUALLY "GUARANTEED" TO RETURN
    CORRECT ANSWERS INDEPENDENT OF SUCH HARDWARE LOSSES.  HOWEVER,
    THERE IS NO EFFECTIVE WAY TO FIX THE FIXNUM-ONLY FUNCTIONS
    (//, \); SUCH FUNCTIONS ARE PERMITTED TO HAVE THE CHARACTERISTICS
    IMPOSED BY THE HOST HARDWARE (THUS ON MULTICS // MAY HAVE
    OTHER PECULIARITIES, FOR ALL I KNOW).  THIS IS BECAUSE THESE
    FUNCTIONS ARE INTENDED TO BE OPEN-CODED AS SINGLE HOST HARDWARE
    INSTRUCTIONS.  BEWARE!

[6] THE FIXNUM- AND FLONUM-ONLY ARITHMETIC FUNCTIONS ARE NOW
    *DEFINED* TO DO "WHAT THE HARDWARE DOES".  THE INTERPRETED
    VERSIONS USED TO DETECT OVERFLOW AND UNDERFLOW, BUT NO MORE.
    THUS YOU CAN USE + TO COMPUTE STRANGE CHECKSUMS, ETC.
    IN ANY CASE, COMPILED AND INTERPRETED CODE SHOULD BE COMPATIBLE
    WITH RESPECT TO THESE FUNCTIONS.  ANY PECULIAR SCREWS IN THE
    HARDWARE ARE NOT COMPENSATED FOR (SEE [5] ABOVE).  THE GENERIC
    ARITHMETIC FUNCTIONS ARE "GUARANTEED" TO BEHAVE "MATHEMATICALLY"
    AND TO COMPENSATE AS NECESSARY FOR SUCH SCREWS.

[7] AN IMPROVED FLONUM PRINT ALGORITHM HAS BEEN INSTALLED.
    I (GLS) HAVE "PROVED" THAT IT HAS THESE PROPERTIES:
    (1) IT OUTPUTS ENOUGH DIGITS THAT NO INFORMATION IS LOST
	(A PERFECT READER, WHICH I DO NOT YET CLAIM LISP HAS,
	CAN ALWAYS RECOVER THE ORIGINAL FLONUM BY ROUNDING).
    (2) IT OUTPUTS NO MORE DIGITS THAN NECESSARY TO ACHIEVE (1).
    (3) IT OUTPUTS THE BEST POSSIBLE DECIMAL FLONUM OF THE
	NUMBER OF DIGITS IN (2).

[8] THANKS TO AN ALGORITHM FROM KAHAN AND HELP FROM RJF (FATEMAN),
    THE SQRT ROUTINE HAS BEEN IMPROVED.  IT IS CONSIDERABLY FASTER.

[9] THE VALUE OF FASLOAD IS NOW THE LIST OF PROPERTIES FASLOAD SHOULD
    CHECK FOR TO DECIDE WHETHER TO PRINT A WARNING MESSAGE.  ITS
    INITIAL VALUE IS (SUBR FSUBR LSUBR), AND SO WILL HAVE THE SAME EFFECT
    AS BEFORE, WHEN THE INITIAL VALUE WAS T.  ALSO AS BEFORE, SETTING FASLOAD
    TO NIL WILL SUPPRESS ALL SUCH ERROR MESSAGES.  ONE CAN BE VERY PARANOID,
    FOR EXAMPLE, AND SET IT TO (EXPR SUBR LSRUB FEXPR FSUBR ARRAY MACRO).

[A] THE PREDICATE FILEP RETURNS T IFF ITS ARGUMENT IS A FILE OBJECT.
    IT WILL RETURN T EVEN IF IT IS A CLOSED FILE; TO DETECT AN OPEN
    FILE, USE (AND (FILEP X) (STATUS FILEMODE X)).

[B] INFERIOR JOB OBJECTS NOW HAVE AN EXTRA SLOT J.CRUFT
    WHICH IS GC-PROTECTED.  SEE SYS:.FASL DEFS FOR THE
    JOB OBJECT DEFINITIONS.  BY CONVENTION, THIS NEW SLOT
    IS USED TO HOLD A PROPERTY LIST FOR VARIOUS DATA ABOUT
    THE JOB.

[C] BECAUSE OF AN ITS DEFICIENCY, THE NEW CODE THAT ALLOWS FILEPOS
    TO WORK ON OUTPUT FILES AND SIOT TO BE USED FOR ALL ASCII I/O
    DOESN'T WORK ON THE USR DEVICE (INFERIOR JOBS).  THE BASIC
    PROBLEM IS THAT SIOT DOESN'T WORK ON THE USR DEVICE IN ITS.
    ONE CONSEQUENCE IS THAT LISPT WILL NOT WORK ON ITS 1051 AND ABOVE
    (FOR WHICH THE NEW SIOT I/O CODE WILL BE PROVIDED IN LISP).

[&] THE FUNCTION LH| IS A HACK FOR THE BENEFIT OF THIRD-FLOOR
    HACKERS.  IT NORMALLY EXISTS ONLY IN THE ITS VERSION.
    THIS FEATURE IS ONLY SEMI-OFFICIAL, AND I WON'T GUARANTEE
    IT TO WORK FOR ANYONE BUT LH AND FRIENDS.
    (LH| <SIZE> <SPACE>) ALLOCATES A CHUNK OF MEMORY <SIZE>
    WORDS BIG OF DATA TYPE <SPACE>.  (ACTUALLY, <SIZE> IS
    ROUNDED UP TO BE AN INTEGRAL NUMBER OF PAGES.)
    THE RETURNED VALUE IS A FIXNUM WHICH IS THE ADDRESS OF
    THE FIRST WORD OF THE CHUNK OF MEMORY.  IF ZERO IS RETURNED,
    IT WAS NOT POSSIBLE TO OBTAIN THE MEMORY.  (THIS SHOULD
    BE FAMILIAR TO GETCOR HACKERS!)  ONE SHOULD **NOT** USE
    (DECLARE (FIXNUM (LH/|))); IT IS NOT A NUMBER FUNCTION
    JUST BECAUSE IT RETURNS A FIXNUM!  NOTICE THAT ONE MUST USE
    A "/" TO GET THE "|" IN THE NAME OF THE FUNCTION.
    THE CHUNK OF MEMORY WILL BE MADE TO HAVE THE DATA TYPE
    INDICATED BY <SPACE>; ONE CAN ALLOCATE THE MEMORY AT WILL
    AND CREATE POINTERS INTO IT.  GC WILL MARK FROM ALL WORDS
    IN THE SPACE IF <SPACE> IS LIST, BIGNUM, OR ANY KIND OF HUNK.
    HOWEVER, THE DATA IN THE MEMORY ITSELF IS NOT MARKED OR SWEPT.
    NO GUARANTEES ARE MADE IF <SPACE> IS "SYMBOL" OR "ARRAY";
    ALL OTHER DATA TYPES SHOULD WORK, HOWEVER.

[;] FOR ANY .FASL CODE HACKERS WHO MAY CARE: THE BITS $FXP AND
    $FLP IN SEGMENT TABLE ENRTIES HAVE DISAPPEARED.  THE BIT
    THAT USED TO BE $FXP IS NOW CALLED $PDLNM, AND $FLP IS NO
    LONGER USED.  PDL NUMBER SEGMENTS NOW HAVE FX+$PDLNM OR
    FL+$PDLNM SET INSTEAD OF $FXP OR $FLP.  (THIS IS TO ALLOW
    INTRODUCTION OF OTHER NUMBER PDLS IN THE FUTURE IF DESIRED.)
    THIS CHANGE IS UPWARD-COMPATIBLE FOR COMPILED CODE WHICH
    OPEN-CODES TYPE TESTS; EVENTUALLY THE COMPILER WILL BE
    CHANGED TO REFLECT THE NEW BITS.

THURSDAY  MARCH 03,1977  FQ+6D.12H.27M.23S.  LISP 1258  - GLS -

WELL, WE ARE WORKING AWAY ON THE NEW LISP MANUAL!
ELLEN IS DOING MOST OF THE WORK, WITH OTHERS PITCHING
IN WRITING NEW TEXT (THE CONFLICTS BETWEEN WHICH ELLEN
GETS TO RESOLVE).  CURRENTLY CHAPTERS 3 AND 4 ARE IN
PROGRESS.
THE FILES ".INFO.;OLDIO ORDER" AND ".INFO.;NEWIO ORDER"
CONTAIN A SUMMARY OF THE FUNCTIONS AND VARIABLES AVAILABLE
IN LISP.  I WILL TRY TO KEEP THESE UP-TO-DATE (THEY ARE
MECHANICALLY GENERATED).
THE FOLLOWING NAMING SCHEME TAKES EFFECT ON ITS AS OF THIS VERSION.
-> MEANS "IS LINKED TO" (DISK-TYPE FILE NAME LINKS).

	L   ->  LISP    ->  NEWIO
	Q   ->  NEWIO   ->  SYS:PURQIO >
	O   ->  OLDIO   ->  SYS:PURBIB >
	OL  ->  OLISP   ->  ONEWIO
	OQ  ->  ONEWIO  ->  SYS:PURQIO NNN (FOR SOME NNN)
	OO  ->  OOLDIO  ->  SYS:PURBIB NNN (FOR SOME NNN)
	OOL ->  OOLISP  ->  OONEWIO
	OOQ ->  OONEWIO ->  SYS:PURQIO <
	OOO ->  OOOLDIO ->  SYS:PURBIB <

THAT IS, L↑K AND LISP↑K NOW ALWAYS GET YOU A NEWIO.
SO DO Q↑K AND NEWIO↑K.  TO GET AN OLDIO, USE O↑K OR OLDIO↑K.
THE "O" AND "OO" VERSIONS GET OLD AND VERY OLD VERSIONS.
THIS WAS ALREADY IN EFFECT ON AI, BUT IS NOW ON ALL ITS
MACHINES.
MANY BUGS HAVE BEEN FIXED IN THIS VERSION, INCLUDING
THE ONE ABOUT GC-OVERFLOW (I HOPE!).  MANY NEW FEATURES
AS FOLLOWS.  AS ALWAYS, NUMBERED ITEMS ARE FOR ALL LISPS,
AND LETTERED ITEMS FOR NEWIO ONLY.

[1] NEW FUNCTION: QUIT (COMPATIBLE WITH MULTICS VERSION)
[2] CHANGES TO GC-RELATED USER INTERRUPTS:
	[2A] GC-OVERFLOW WORKS BETTER - CAN GET SEVERAL PER GC
	[2B] GC-DAEMON GETS MORE INFORMATION NOWADAYS
[3] CHANGES TO STATUS FUNCTIONS:
	[3A] (STATUS PURSPCNAMES) YIELDS NAMES OF ALL PURE SPACES
	[3B] (STATUS HACTRN) YIELDS T FOR UNKNOWN SUPERIOR
	[3C] (STATUS XJNAME) HAS BEEN RENAMED (STATUS SUBSYSTEM)
	[3D] (STATUS XUNAME) HAS BEEN RENAMED (STATUS USERID)
	[3E] (STATUS FEATURE TOPS-10) IS BEST WAY TO CHECK FOR TOPS-10
	[3F] WE ARE PHASING OUT (STATUS TERPRI) - USE TERPRI VARIABLE

[A] FILEPOS WORKS ON OUTPUT FILES - ALL ITS I/O USES SIOT NOW
[B] INCLUDE PROVIDES AN EOFFN TO MAKE EOF TRANSPARENT
[C] AUTOLOAD NOW USES LOAD INSTEAD OF FASLOAD (LIKE MULTICS)
[D] DELETEF OF AN OPEN FILE NOW USES DELEWO (IT USED TO JUST LOSE)
[E] THE RENAME FUNCTION HAS BEEN RENAMED TO RENAMEF
[F] (STATUS TTYREAD) IS NOW IN THE READTABLE AGAIN IN NEWIO
[G] NUMERIC (STATUS TTYINT) VALUES CAN NOW FILTER ALL SUPRA-ASCII BITS
----------------------------------------------------------------
[1] (QUIT), AS ON MULTICS, CAUSES THE LISP JOB TO COMMIT SUICIDE.
    (IT DOES NOT PRODUCE A ↑G OR ↑X QUIT - FOR THOSE, USE THE
    ↑G FUNCTION OR (ERROR 'QUIT)!)
    QUIT IS ACTUALLY AN LSUBR OF 0 TO 1 ARGUMENTS.  POSSIBLE
    VALUES FOR THE ARGUMENT:
	NIL	SAME AS NO ARGUMENT - DO A NORMAL QUIT
	T	QUIT AS NOISELESSLY AS POSSIBLE (DON'T PRINT :KILL, ETC.)
	ERROR	ERROR QUIT.  FLUSH TYPEAHEAD, AND GENERALLY CLEAN UP.
	<N>	A FIXNUM ARGUMENT IS MACHINE-DEPENDENT.  ON ITS, IT IS
		FED AS THE EFFECTIVE ADDRESS FOR .BREAK 16,.

[2] CHANGES TO GC-RELATED USER INTERRUPTS:
	[2A] IT USED TO BE THAT IF SEVERAL SPACES GOT A GC-OVERFLOW
	     CONDITION DURING A SINGLE GC, ONLY ONE INTERRUPT WOULD
	     BE SIGNALED.  NOW ALL OF THEM SHOULD BE SIGNALLED, AS
	     SEPARATE INTERRUPTS.
	[2B] THE ARGUMENT RECEIVED BY GC-DAEMON HAS BEEN CHANGED
	     IN AN INCOMPATIBLE MANNER.  THE OLD FORMAT WAS:
		( (<SPACE> <FREE-BEFORE> . <FREE-AFTER>) ...)
	     THE NEW FORMAT IS:
		( (<SPACE-NAME> <FREE-BEFORE> <FREE-AFTER>
			<SIZE-BEFORE> <SIZE-AFTER>)
		  ...)
	     THE TWO NEW QUANTITIES ARE THE SIZE OF THE SPACE AT
	     THE BEGINNING AND END OF THE GC.  THE DIFFERENCE OF
	     THESE TWO QUANTITIES GIVES THE AMOUNT OF SPACE
	     ADDED DURING THE GC, WHILE THE DIFFERENCE BETWEEN
	     <SIZE-BEFORE> AND THE <SIZE-AFTER> FROM THE PREVIOUS
	     GC GIVES THE AMOUNT ADDED BETWEEN GC'S.  NOTE ALSO
	     THAT THE NEW FORMAT DOESN'T HAVE THAT CRETINOUS
	     DOTTED PAIR, SO LATER MORE INFORMATION CAN BE ADDED
	     COMPATIBLY.

[3] CHANGES TO STATUS FUNCTIONS:
	[3A] (STATUS PURSPCNAMES) YIELDS NAMES OF ALL PURE SPACES.
	     PRESENTLY THIS IS (LIST FIXNUM FLONUM BIGNUM),
	     BUT IN CASE THIS EVER CHANGES, THIS STATUS CALL IS
	     THE RIGHT WAY TO FIND THEM ALL.  RECALL THAT
	     (STATUS SPCNAMES) GIVES THE NAMES OF NON-PURE SPACES.
	[3B] (STATUS HACTRN) YIELDS T FOR UNKNOWN SUPERIOR.
	     AS BEFORE, IT CAN ALSO YIELD "DDT" FOR A DDT SUPERIOR,
	     "LISP" FOR A LISP SUPERIOR (THIS IS DETERMINED BY
	     BITS IN THE .OPTION USER VARIABLE), OR NIL FOR NO
	     SUPERIOR.
	[3C] (STATUS XJNAME) HAS BEEN RENAMED (STATUS SUBSYSTEM).
	     EVENTUALLY THIS WILL BE MADE MEANINGFUL ON TOPS-10
	     AND MULTICS IMPLEMENTATIONS.  THE INTENDED INTERPRETATION
	     IS "THE GENERIC NAME OF THIS PROGRAM".
	     (STATUS JNAME) IS TO BE INTERPRETED AS "THE UNIQUE
	     IDENTIFIER OF THIS JOB WITHIN THE TIME-SHARING SYSTEM".
	[3D] (STATUS XUNAME) HAS BEEN RENAMED (STATUS USERID).
	     EVENTUALLY THIS WILL BE MADE MEANINGFUL ON TOPS-10
	     AND MULTICS IMPLEMENTATIONS.  THE INTENDED INTERPRETATION
	     IS "THE GENERIC NAME OF THIS USER (E.G. "FRED").
	     (STATUS UNAME) IS TO BE INTERPRETED AS "THE UNIQUE
	     IDENTIFIER OF THIS LOGGED-IN INSTANCE OF THE USER
	     WITHIN THE TIME-SHARING SYSTEM".
	[3E] (STATUS FEATURE TOPS-10) IS BEST WAY TO CHECK FOR
	     RUNNING UNDER A REAL TOPS-10 SYSTEM.  WE MAY PHASE OUT
	     (STATUS FEATURE DEC10), OR LET IT MEAN ANY TOPS-10-LIKE
	     SYSTEM, SUCH AS SAIL.  WE ALSO ANTICIPATE HAVING TO
	     INTRODUCE (STATUS FEATURE TOPS-20) SOMEDAY.
	[3F] WE ARE PHASING OUT (STATUS TERPRI).  PLEASE ELIMINATE
	     FROM YOUR PROGRAMS IF POSSIBLE.  IN NEWIO YOU CAN SET
	     THE LINEL OF A FILE TO 0 INSTEAD, OR YOU CAN BIND
	     THE TERPRI VARIABLE.

[A] FILEPOS NOW WORKS ON OUTPUT FILES, THANKS TO IMPROVEMENTS
    TO ITS.  THIS ONLY WORKS IN ITS VERSION 1048 OR GREATER,
    AND SO WILL NOT APPEAR ON A GIVEN MACHINE UNTIL A VERSION
    OF ITS APPEARS WHICH CAN SUPPORT THE FEATURE.
    AS A COROLLARY, ALL LISP BUFFERED I/O IS DONE WITH SIOT.
    IN THIS WAY EXACT CHARACTER COUNTS ARE USED, ELIMINATING
    THE TRAILING CONTROL-C PROBLEM.

[B] INCLUDE PROVIDES AN EOFFN TO MAKE EOF TRANSPARENT.
    WHEN READING OFF THE END OF AN INCLUDED FILE, NO EOF
    SHOULD BE DETECTED (UNLESS READ WAS IN THE MIDDLE OF AN
    OBJECT, WHICH CAUSES A FAIL-ACT); READING SHOULD JUST
    CONTINUE IN THE FILE POPPED OFF THE INSTACK.  THIS MEANS
    THAT AN INCLUDED FILE IS JUST LIKE STICKING THE INCLUDED
    FILE IN THE MIDDLE OF THE INCLUDING I/O STREAM.

[C] AUTOLOAD NOW USES LOAD INSTEAD OF FASLOAD (LIKE MULTICS).

[D] DELETEF OF AN OPEN FILE NOW USES DELEWO (IT USED TO JUST LOSE).
    THIS TOO DEPENDS ON ITS VERSION 1048 OR GREATER.

[E] THE RENAME FUNCTION HAS BEEN RENAMED TO RENAMEF.
    THIS IS FOR COMPATIBILITY WITH DELETEF, MERGEF, PROBEF, ETC.,
    AND TO AVOID USING UP A GOOD WORD.

[F] (STATUS TTYREAD) IS NOW IN THE READTABLE AGAIN IN NEWIO.
    THIS IS COMPATIBLE WITH OLDIO, AND ALSO MAKES MORE SENSE
    SINCE IT IS RELATED TO THE FORCE-FEED BITS WHICH ARE ALSO
    IN THE READTABLE.  SINCE IT NEVER WORKED BEFORE IN NEWIO
    ANYWAY, THIS SHOULD NOT BREAK ANY PROGRAMS!

[G] RECALL THE FORMER OBSCURE FEATURE THAT IF AN "INTERRUPT
    FUNCTION" FOR THE KEYBOARD SET VIA (SSTATUS TTYINT) IS A
    FIXNUM, THEN IT SPECIFIES THE DEFAULT LISP ACTION FOR
    AN INTERRUPT CHARACTER OF THAT ASCII VALUE;  AND THAT FURTHERMORE
    SUPRA-ASCII BITS COULD BE USED TO FILTER THE CONTROL AND
    META BITS, NAMELY 400 REQUIRED THE META BIT TO BE PRESENT
    FOR THE ACTION TO OCCUR, AND 400←22 FORBADE THE PRESENCE
    OF THE META BIT, AND SIMILARLY FOR 200 AND THE CONTROL BIT.
    THIS HAS BEEN EXTENDED TO THE TOP BIT (4000), THE SHIFT-LOCK
    BIT (2000), AND THE SHIFT BIT (1000).  IF YOU REALLY WANT
    TO HACK AROUND WITH 12-BIT KEYBOARD INPUT, THIS IS YOUR
    CUP OF T.

THURSDAY  JAN 06,1977  FM+1D.23H.52M.11S.   LISP 1252  - GLS -

WELL, FOLKS, JONL HAS GONE TO IBM FOR SEVERAL MOONS, AND I AM WORKING
ON MY THESIS THIS SEMESTER (DUE IN MAY), SO DON'T EXPECT TO GET
NEW FEATURES IMPLEMENTED WITH BLINDING SPEED.  I WILL DO MY BEST TO
FIX ANY BUGS THAT CROP UP (IN PARTICULAR, I BELIEVE I HAVE FIXED
THE NEFARIOUS FASLOAD BUG OF VERSION 1251).  MOST OF THE ITEMS
BELOW ARE NOT BRAND NEW, BUT JUST THINGS THAT DIDN'T WORK UNTIL NOW
OR WERE NEVER DOCUMENTED PROPERLY.

AS USUAL, NUMBERS=ALL LISPS, LETTERS=NEWIO ONLY.

[1] PRINC NOW NO LONGER AUTO-TERPRI'S BEFORE ATOMS.
[2] NEW "EVALSHUNT" HACK FOR PECULIAR FORMS.
[3] GC NOW MARKS HUNKS MORE SPACE-EFFICIENTLY.
[4] HOW TO DEFINE NEW EDITOR COMMANDS.

[A] NEW FUNCTION: +TYO
[B] SEEING GC STATISTICS IN THE WHO-LINE.
----------------------------------------------------------------
[1] PRINC NOW NO LONGER ATTEMPTS TO GET IN A TERPRI BEFORE AN
    ATOM IF NECESSARY.  (IT DOES, HOWEVER, PROVIDE A TERPRI ON
    REACHING THE LINEL UNLESS OTHERWISE OVERRIDDEN BY THE VALUE OF
    TERPRI OR BY (SSTATUS TERPRI ...).)  PRIN1 CONTINUES TO PUT
    IN AUTO-TERPRI'S BEFORE ATOMS.

[2] WHEN EVAL COMES UPON A FORM WHOSE CAR IS NON-ATOMIC AND
    WHOSE CAAR IS NOT LAMBDA, FUNARG, OR LABEL, AND IF THE
    VALUE OF THE ATOM EVAL IS NON-NIL, THEN THIS VALUE
    SHOULD BE A FUNCTION OF ONE ARGUMENT, AND IT IS CALLED ON THE
    FORM.  IT IS THE RESPONSIBILITY OF THE FUNCTION TO EVALUATE THE
    FORM AND DELIVER AN APPROPRIATE VALUE.  THIS IS KNOWN AS THE
    "EVALSHUNT" KLUDGE.

[3] GC NOW TAKES MUCH LESS PDL TO MARK HUNKS.  IF YOU HAVE GOTTEN
    PDL OVERFLOW DURING GC WHILE USING HUNKS, THIS SHOULD ALLEVIATE
    YOUR PROBLEM.

[4] IF EDIT READS A COMMAND WHOSE NAME IS NOT RECOGNIZED, THEN IF THE
    ATOM OF THAT NAME HAS AN EDIT PROPERTY, THEN THAT PROPERTY SHOULD
    BE A FUNCTION.  IT WILL BE CALLED WITH THE REPEAT COUNT AS AN ARGUMENT
    (0 IS SUPPLIED IF NO ARGUMENT IS GIVEN).  THE FUNCTION MAY
    DO ANYTHING IT LIKES, BUT WILL PROBABLY WANT TO OPERATE ON THE
    FUNCTION BEING EDITED.  THE EDITOR'S CURSOR IS REPRESENTED BY
    TWO DATA STRUCTURES, THE "LEFT-LIST" AND THE "UP-LIST".
    THE FORMER SAYS HOW TO BACK UP AT THE CURRENT LEVEL OF LIST;
    THE LATTER SAYS HOW TO BACK UP A LEVEL OF LIST STRUCTURE.
    THE LEFT-LIST IS THE VALUE OF THE ATOM }}} (THREE ALTMODES),
    AND THE UP-LIST IS THE VALUE OF THE ATOM ↑↑↑ (THREE UPARROWS OR
    CIRCUMFLEXES, ASCII 136).
    THE CAR OF THE LEFT-LIST IS THE LEVEL OF LIST STRUCTURE BEING
    EDITED; THE CURSOR IS CONSIDERED TO BE BEFORE THE CAAR
    OF THE LEFT-LIST.  THE CDR OF THE LEFT-LIST IS THE LEFT-LIST
    FOR THE PREVIOUS POINT IN THIS LEVEL OF LIST.  THE UP-LIST
    IS A STACK OF OLD LEFT-LISTS.
    THE FOLLOWING FUNCTIONS ARE USEFUL UTILITIES FOR BUILDING
    NEW EDITOR FUNCTIONS, AND ILLUSTRATE THE CORRECT WAY TO MANIPULATE
    THE LEFT-LIST AND UP-LIST.
	(DEFUN RIGHT () (AND (EDCAR) (SETQ }}} (CONS (CDAR }}}) }}}))))
	(DEFUN LEFT () (AND }}} (CDR }}}) (SETQ }}} (CDR }}}))))
	(DEFUN DOWN () (AND (EDCAAR)
			    (SETQ ↑↑↑ (CONS }}} ↑↑↑) }}} (NCONS (CAAR }}})))))
	(DEFUN UP () (AND ↑↑↑ (CAR ↑↑↑) (CDR ↑↑↑)
			  (SETQ }}} (CAR ↑↑↑) ↑↑↑ (CDR ↑↑↑))))
	(DEFUN YANK (FN)
	       ((LAMBDA (PL)
			(COND (PL (SETQ ↑↑↑ NIL)
				  (SETQ }}} (NCONS PL)))
			      (T (PRINC '|??|))))
		(GETL FN EDIT)))
	(DEFUN SPLICE (IT)
	       (COND ((AND (LEFT) (EDCAR))
		      (RPLACD (CAR }}}) IT)
		      (RIGHT))
		     ((AND (UP) (EDCAR))
		      (RPLACA (CAR }}}) IT)
		      (DOWN))))
	(DEFUN KILL ()
	       (PROG2 NIL (CAAR }}})
		      (SPLICE (COND ((EDCAR) (CDAR }}})) (T (CAR }}}))))))
	(DEFUN INSERT (IT)
	       (SPLICE (CONS IT (AND }}} (CAR }}}))))
	       (RIGHT))

	(DEFUN EDCAR () (AND }}} (NOT (ATOM (CAR }}})))))
	(DEFUN EDCAAR () (AND (EDCAR) (NOT (ATOM (CAAR }}})))))

    NOTICE THAT LEFT AND RIGHT AND UP AND DOWN RETURN NIL
    IF THEY FAIL.  KILL RETURNS THE THING KILLED (THE STANDARD
    EDITOR COMMAND "K" PUTS THIS THING INTO THE VALUE CELL OF "}}".)
    AS TWO EXAMPLES OF NEW EDITOR COMMANDS, CONSIDER
    "XCH" (NOTE THAT NAMES OF EDITOR COMMANDS MUST BE THREE CHARACTERS OR
    FEWER), WHICH TRANSPOSES THE NEXT TWO ITEMS AFTER THE CURSOR,
    AND "BRY", WHICH BURIES THE NEXT THING IN <ARGUMENT> LEVELS
    OF LIST STRUCTURE.

	(DEFPROP XCH ED-EXCHANGE EDIT)
	(DEFUN ED-EXCHANGE (N)		       ;ARGUMENT IS IGNORED
	       (INSERT (PROG2 NIL (KILL) (RIGHT))))

	(DEFPROP BRY ED-BURY EDIT)
	(DEFUN ED-BURY (N)
	       (AND (EDCAR)
		    (DO ((I (MAX N 1) (- I 1)))
			((ZEROP I))
			(SPLICE (RPLACA (CAR }}}) (NCONS (CAAR }}})))))))

    I HAVE TESTED THESE DEFINITIONS AND THEY SEEM TO WORK.

[A] THE NEW FUNCTION +TYO OF TWO ARGUMENTS IS A SUPER-FAST TYO.
    THE FIRST ARGUMENT IS THE ASCII VALUE TO OUTPUT AND THE
    SECOND IS THE FILE TO OUTPUT IT ON.  THE ATOM "T" MAY NOT
    BE USED AS A SECOND ARGUMENT; INSTEAD OF (+TYO 43 T), SAY
    (+TYO 43 TYO) OR THE EQUIVALENT.  ALSO, THE SECOND ARGUMENT
    MUST BE A SINGLE FILE, NOT A LIST OF FILES.  THE +TYO FUNCTION
    DOES NO ARGUMENT CHECKING IF NOT IN *RSET MODE.
    IT DOES NOT ATTEMPT TO UPDATE THE CHARPOS OF THE FILE, OR
    SUPPLY AN AUTO-TERPRI FOR EXCEEDING THE LINEL.  IT DOES CHECK
    FOR NON-IMAGE-MODE TTY FILES AND IN THAT CASE CONVERT ↑P AND ↑C
    TO ↑P P AND ↑P Q.  IT ALSO UPDATES THE FILEPOS CORRECTLY.

[B] NEWIO HAS HAD FOR SOME TIME STATUS CALLS FOR MANIPULATING THE
    WHO-LINE; THESE WERE DESCRIBED PREVIOUSLY IN LISP ARCHIV.
    NOW A NEW STATUS CALL CONTROLS THE DISPLAY OF GC STATISTICS IN
    THE WHO-LINE.
	(STATUS GCWHO) RETURNS THE CURRENT GCWHO STATUS AS A FIXNUM.
	(SSTATUS GCWHO <N>) SETS THE STATUS TO THE FIXNUM <N>.
    RIGHT NOW ONLY THE 1 AND 2 BITS OF THE STATUS ARE SIGNIFICANT.
    1 MEANS THAT DURING A GC, THE WHO-LINE SHOULD BE ALTERED TO
    READ "GC:XXXXX" WHERE XXXXX IS THE REASON FOR THE GC.
    AT THE END OF THE GARBAGE COLLECTION THE WHO-LINE IS RESTORED.
    2 MEANS THAT AT THE END OF THE GC THE .WHO2 WORD SHOULD
    BE CLOBBERED WITH GC RUN TIME INFORMATION.  SPECIFICALLY,
    THE LEFT HALF GETS THE PERCENTAGE OF RUN TIME WHICH HAS BEEN
    SPENT IN GC, AND THE RIGHT HALF GETS THE GC RUN TIME IN FORTIETHS
    OF A SECOND.  IF THE FIRST TWO ARGUMENTS TO (SSTATUS WHO1 ...)
    ARE 52 OCTAL AND '%, THEN THESE STATISTICS WILL BE PRINTED
    IN THE FORM "NNN% HH:MM:DD.T", JUST LIKE THE STANDARD SYSTEM
    RUNTIME PERCENTAGE AND VALUE.  IN THIS WAY ONE CAN CONTINUOUSLY
    MONITOR GC RUN TIME STATISTICS.  THE 1 AND 2 BITS MAY BE USED
    TOGETHER (3) OR INDEPENDENTLY.  NOTE THAT WHILE USING THE 2 BIT
    THE .WHO3 VARIABLE IS STILL LEFT OVER FOR USE BY THE USER.
    THUS ONE MIGHT SAY:
	(SSTATUS WHO1 52 '% 166 0)
	(SSTATUS GCWHO 3)
	(SSTATUS WHO3 'QUUX)
    AND ONE WOULD NORMALLY SEE "43% 00:15:07.8 QUUX", BUT DURING
    A GC ONE WOULD SEE "GC:FIXNUM" OR WHATEVER.
    A NOTE FOR THOSE WHO USE SUSPEND:  IF THE SUSPENDED JOB IS DUMPED
    OUT AND LATER RELOADED, THE RUNTIME (MAINTAINED BY THE TIME-SHARING
    SYSTEM) WILL HAVE BEEN RESET, BUT NOT THE GCTIME, WHICH IS MAINTAINED
    BY LISP.  THEREFORE A ROUTINE WHICH DOES A SUSPEND SHOULD PERFORM
    (SSTATUS GCTIME 0) ON RETURN FROM THE SUSPEND IN ORDER TO MAKE
    THE WHO-LINE AND OTHER GC STATISTICS ACCURATE.


WEDNESDAY  DEC 29,1976  FQ+1D.9H.29M.54S.  LISP 1251  -JONL-


AS USUAL, NUMBERED ITEMS APPLY BOTH TO OLDIO AND NEWIO LISPS;
LETTERED ITEMS APPLY ONLY TO NEWIO.

1) THE FUNCTION "RANDOM" HAS BEEN SLIGHTLY IMPROVED
2) NUMBERS GIVEN AS FILE-NAME ARGUMENTS ARE NOW CONVERTED TO 
   SYMBOLIC STRINGS ACCORDING TO A RIGID ALGORITHM.
3) ALLOC NO LONGER ASKS FOR "CORE?".
4) ALL VERSIONS ARE NOW BIBOP.  TOPS-10 VERSION IS FULLY BIBOPIFIED.
5) MACDMP HAS BEEN FLUSHED.  USE SUSPEND.
6) THE VALUE OF THE ATOM "TERPRI" NOW CONTROLS THE AUTOMATIC 
   INSERTION OF NEWLINE CHARACTERS IN THE CHARACTER OUTPUT STREAMS.
7) MORE THINGS OPEN-CODED BY NCOMPLR, AND OTHER UPDATES
8) EDIT ALLOWS THE USER TO DEFINE NEW EDITING FUNCTIONS:


[A] HOW TO USE DEFAULT LINEL AND PAGEL FOR FILES.
[B] NCOMPLR THINKS IT KNOWS ABOUT INCLUDE NOW
[C] WHO-LINES ON AI TV-TERMINALS ARE NOW USABLE.

----------------------------------------------------------------

1) "RANDOM" CHANGED SLIGHTLY.  NEW ALGORITHM FROM KNUTH IS MUCH 
    BETTER - NO LONGER HAS THE CORRELATED-TRIPLES PROPERTY. 
    (RANDOM NIL) AS WELL AS ANY TWO-ARGUMENT CALL TO RANDOM RESTARTS
    THE GENERATOR OVER AT ITS BEGINNING.  TIMING IS THE SAME.
2) FIXNUMS GIVEN AS FILE NAMES:  PREVIOUSLY, THESE WERE CONVERTED 
    TO CHARACTER STRINGS MERELY BY PRINTING IN THE CURRENT BASE.  
    NOW, THE BASE IS TEMPORARILY LAMBDA-BOUND TO TEN, AND *NOPOINT 
    TO NIL, DURING THE CONVERSION.  FOR EXAMPLE, IF BASE=IBASE=8, 
    THEN TYPING IN AND EVALING THE FORM 
	    (UREAD TEST 131 DSK LOSER)
    WILL RESULT IN SELECTING THE FILE    DSK:LOSER;TEST 89
3) ALLOC NO LONGER ASKS FOR "CORE".  A # WILL PROMP THE ENTRIES THAT 
    CANNOT BE EXPANDED AFTER ALLOCATION.  FOR ITS VERSIONS ONLY THE 
    PDLS CANNOT BE EXPANDED, BUT IN THE TOPS-10 VERSION, 
    BINARY-PROGRAM-SPACE MAY NOT BE FURTHER EXPANDED.

4) AND 5)  HOORAY, HOORAY!

6) THE VALUE OF THE ATOM "TERPRI" NOW CONTROLS THE AUTOMATIC 
   INSERTION OF NEWLINE CHARACTERS IN THE CHARACTER OUTPUT STREAMS.
   IF NON-NIL, THEN ALL SUCH AUTOMATIC INSERTION IS SUPPRESSED FOR 
   ALL OUTPUT FILES AND DEVICES, REGARDLESS OF THEIR PARTICULAR 
   LINELS. IN NEWIO, IF THE LINEL FOR A PARTICULAR OUTPUT FILE IS 0,
   THEN THE AUTOMATIC INSERTION IS SUPPRESSED FOR THAT FILE.

7) NCOMPLR NOW OPEN-CODES TYPEP, ATOM, NUMBERP, FIXP, FLOATP, BIGP,
   ZEROP, MINUSP, PLUSP, AND HUNKP USING THE SEGMENT TABLE.
   FOR TOPS-10 LUSERS: THE MAKLAP PARSER ACCEPTS PPN DESIGNATIONS 
			IN SQUARE BRACKETS.
   FOR ITS LUSERS:     @DEFINE HAS BEEN DEFINED.  SEE DOCUMENTATION 
			FOR THE @ CROSS-REFERENCING PROGRAM.
   THE VALUE OF THE ATOM "GCPROTECT" NOW CONTROLS HOW LAP AND FASLOAD
	USE THAT FUNCTION.  THIS IS A SPECIAL HAC FOR OWL SYSTEM, AND
	NO ONE ELSE SHOULD EVER SET "GCPROTECT" TO NON-NIL.

8) EDIT ALLOWS THE USER TO DEFINE NEW EDITING FUNCTIONS.  PUTTING AN 
   "EDIT" PROPERTY ON AN ATOM MAKES IT AN EDITOR COMMAND, AND WHEN 
   INVOKED, THAT FUNCTIONS IS CALLED WITH THREE ARGUMENTS:
	  I) REPEAT COUNT
	 II) THE CURRENT "LEFT-LIST"  (VALUE OF THE ATOM }}})
	III) THE CURRENT "UP-LIST"
   FOR MORE DETAILS, SEE THE FILE MC:LISP;EDITOR >


[A] WHENEVER A FILE-OBJECT IS CREATED, SUCH AS BY "OPEN", THE LINEL AND
   PAGEL ARE SET FROM AN INTERNAL DEFAULT VALUE.  THESE VALUES ARE
   ACCESSED BY (LINEL NIL) (PAGEL NIL), AND SET TO NEW VALUES BY 
   (LINEL NIL <NEWVAL>) (PAGEL NIL <NEWVAL>)

[B] QCOMPLR THINKS IT KNOWS ABOUT INCLUDE.  WHAT MORE CAN WE SAY?

[C] THERE ARE THREE WHO-LINES USABLE FROM LISP ON THE AI MACHINE, 
   AND THE GARBAGE-COLLECTOR CAN DISPLAY ITS OPERATIONS ON A WHO-LINE
   QUUX WILL DOCUMENT THIS STUFF AS AND WHEN IT IS OPERATIONAL.


TUESDAY  SEPT 14,1976   FM+6D.1H.33M.7S.   LISP 1211  -GLS,JONL-

OLDIO AND NEWIO LISPS NOW BOTH ANNOUNCE THEMSELVES AS SUCH.
YOU CAN GET AN OLDIO BY TYPING OLDIO↑K OR O↑K; AS BEFORE,
NEWIO↑K OR Q↑K GETS A NEWIO.  IN THE NEAR FUTURE, LISP↑K
AND L↑K WILL START PROVIDING A NEWIO INSTEAD OF AN OLDIO.
OLDIO WILL STILL BE AVAILABLE AS OLDIO↑K OR O↑K FOR SEVERAL
MONTHS AFTER THAT.

NUMBERED ITEMS BELOW APPLY TO ALL LISPS; LETTERED ONES TO NEWIO ONLY.

[1] WHAT ARE PEOPLE USING HUNKS FOR?
[2] NEW ARITHMETIC FUNCTION:  IFIX
[3] "AUTOLOAD" HAS LOWER PRIORITY THAN OTHER FUNCTIONAL PROPERTIES
[4] ALLOC FUNCTION AND GC PRINTOUT SUPPRESS ZERO-SIZE SPACES
[5] EVALHOOK NOW HOOKS BOTH A MACRO CALL AND ITS EXPANSION
[6] NEW .FASL MACRO PRINTS SUPPRESSABLE LOAD MESSAGE
[7] CHANGES TO EDIT FUNCTION AND NEW COMMANDS

[A] NEWIO NOW PROVIDES A ##MORE## PROCESSOR
[B] NEW NVID, SLAVE, MPX PACKAGES FOR NEWIO
[C] PROBLEM WITH INIT FILES IN NEWIO: UREAD DOESN'T CLOSE THEM
[D] UNTRAPPED MEMORY AND MACHINE ERRORS NOW GO TO DDT
[E] CHANGES TO HANDLING OF TTY BLOCK OUTPUT
[F] BUG OF FASLOAD FROM WITHIN FASLOAD-FILE-NOT-FOUND BREAK FIXED
[G] STUPID SPACE-SWALLOWING THING ONLY HAPPENS IF READ IS NIL
[H] NEW CURSORPOS FEATURES: A, H, I, V
[I] THE ACTION AT END-OF-FILE HAS BEEN CHANGED
----------------------------------------------------------------
[1] IF YOU USE HUNKS, SEND SOME MAIL TO GLS SAYING FOR WHAT.
    (JUST NOSY, I GUESS.)  NCOMPLR NOW OPEN-CODES CXR.

[2] (IFIX X) IS JUST LIKE (FIX X), EXCEPT THAT X IS CONSTRAINED TO BE
    WITHIN THE RANGE OF FIXNUMS.  WHILE "FIX" MAY RETURN A BIGNUM,
    "IFIX" WILL NOT, AND THIS ALLOWS EFFICIENT OPEN-CODING OF "IFIX".
    CAVEAT EMPTOR!  THIS IS NOT THE SAME FUNCTION AS FORTRAN'S "IFIX":
    THIS ONE IS THE SAME AS THE "ENTIER" FUNCTION, AS IN ALGOL.

[3] WHENEVER LISP LOOKS UP A FUNCTION ON A PROPERTY LIST, IT
    WILL NOW PREFER A SUBR, EXPR, ETC. TO AN AUTOLOAD PROPERTY
    EVEN IF THE SUBR (OR WHATEVER) OCCURS AFTER THE AUTOLOAD
    PROPERTY ON THE PROPERTY LIST.  THAT IS, IT EFFECTIVELY
    LOOKS FOR OTHER FUNCTIONAL PROPERTIES FIRST, AND ONLY ON
    FAILURE DOES LISP CHECK FOR AN AUTOLOAD PROPERTY.
    THIS FIXES THE SCREW WHERE ONE PACKAGE DEFINES THE SUBR
    FOO AND THEN ANOTHER DOES (DEFPROP FOO ... AUTOLOAD).

[4] IF A SPACE HAS ZERO SIZE (OFTEN TRUE OF HUNK SPACES!),
    THEN THE ALLOC FUNCTION WILL NOT INCLUDE THE SPACE IN
    THE RETURNED DATA, AND GC STATISTICS PRINTOUT WILL NOT
    MENTION THE SPACE.  (STATUS SPCNAMES) WILL, HOWEVER,
    MENTION ALL SPACES, EVEN THOSE OF ZERO SIZE.

[5] EVALHOOK NOW HOOKS BOTH A MACRO CALL AND ITS EXPANSION.
    FORMERLY THE HOOK FUNCTION SAW THE MACRO CALL, AND THEN
    THE FIRST FORM WITHIN THE EXPANSION, BUT NOT THE EXPANSION
    ITSELF.

[6] MANY AUXILLIARY FILES, SUCH AS "GRIND", "LAP", "ALLFILES", ETC.
    WHICH ARE AUTOLOADABLE, OR FASLOADED BY THE USER, PRINT A MESSAGE
    ANNOUNCING THEIR VERSION NUMBER AND THE FACT THAT THEY ARE BEING
    LOADED.  FOR EXAMPLE,  WHEN ALLFILES IS LOADED, IT PRINTS
		;LOADING ALLFILES 43
    BY CONVENTION, ALL SUCH LOADING MESSAGES ARE SUPPRESSED IF THE 
    USER HAS DONE (SSTATUS FEATURE NOLDMSG).  ALL SUCH FILES WRITTEN
    IN LISP HAVE EXPR CODE WHICH CHECKS THE FEATURE LIST FOR 
    "NOLDMSG", AND IF ABSENT, PRINTS THE LOADING MESSAGE.
    TO FACILITATE SUCH A MESSAGE PRINTING FEATURE FOR PACKAGES WRITTEN
    IN MIDAS, THE STANDARD FILE "SYS:.FASL DEFS", TO BE INSERTED BY 
    .FASL FILES, NOW HAS A MACRO "VERPRT".  ITS ARGUMENT SHOULD BE 
    THE NAME OF THE PACKAGE; IT GENERATES A .SXEVAL FORM WHICH
    WILL PRINT A MESSAGE WHEN THE FILE IS LOADED. FOR EXAMPLE,
    THE ALLFILES PACKAGE EFFECTIVELY BEGINS:
		TITLE ALLFILES
		.FASL
		.INSRT SYS:.FASL DEFS
		VERPRT ALLFILES

    THE GENERATED FORM WORKS IN EITHER OLDIO OR NEWIO;
    IN NEWIO, THE MESSAGE IS PRINTED ON THE FILES SPECIFIED
    BY THE VARIABLE "MSGFILES" (WHICH IS ALSO USED BY ALL LISP
    SYSTEM MESSAGES).

[7] CHANGES TO THE "BINFORD EDITOR" (EDIT FUNCTION):
	  [7.1] THE COMMANDS "C" AND "-C" HAVE DISAPPEARED.
		THEY WERE EQUIVALENT TO THE STILL-EXISTING
		"F" AND "-F" COMMANDS.
	  [7.2]	"SS" = "SAVE SPOT", "RS" = "RESTORE SPOT"
		BOTH TAKE AN ATOMIC SYMBOL AS AN ARGUMENT.
		SS SAVES THE CURRENT "SPOT" (WHERE THE $$ APPEARS)
		AS THE VALUE OF THE SPECIFIED VARIABLE, AND RS
		RETURNS TO THAT SPOT.  THUS:
			SS FOO
			... LOTSA EDITING ...
			RS FOO
			<NOW CURSOR IS WHERE IT WAS BEFORE THE SS>
	  [7.3]	AN ARGUMENT TO EDIT NO LONGER CONTROLS THE AUTO-PRINT
		FEATURE (SEE [7.4] BELOW);  INSTEAD, IT SHOULD BE AN
		ATOMIC SYMBOL, THE NAME OF A FUNCTION.  AS THE EDITOR
		IS ENTERED, THAT FUNCTION IS "YANKED" SO THAT EDITING 
		MAY BEGIN ON ITS CODE WITHOUT EXPLICITLY USING THE 
		"Y" COMMAND.  THE VALUE OF THE VARIABLE "EDIT" 
		CONTROLS WHICH PROPERTIES WILL BE HUNTED FOR BY THE 
		"Y" OPERATION [INITIAL VALUE IS (EXPR FEXPR MACRO)].
	  [7.4] "SP" = "START/STOP PRINTING" TOGGLES THE STATE OF
		THE AUTOMATIC PRINTOUT AFTER EACH COMMAND.
	  [7.5]	"-KI" IS LIKE "L KI"; THAT IS, IT REPLACES THE
		PRECEDING S-EXPRESSION WITH ITS ARGUMENT.
	  [7.6]	AN "S" COMMAND IMMEDIATELY FOLLOWED BY "$$"
		(I.E. A NULL SEARCH STRING" WILL REPEAT THE PREVIOUS
		SEARCH, AS IN TECO.
	  [7.7]	YANKING IN A VALUE PROPERTY NOW WINS.  THUS:
			YP FOO VALUE $$
		ALLOWS YOU TO EDIT THE VALUE PROPERTY OF FOO.
----------------------------------------------------------------
[A] NEWIO NOW PROVIDES A ##MORE## PROCESSOR, IF YOU ARE IN
    ":TCTYP MORE" MODE WHEN LISP STARTS UP.  WHEN THE END OF
    THE SCREEN IS REACHED, "##MORE##" IS PRINTED, AND LISP
    WAITS FOR A CHARACTER.  SPACE OR RUBOUT IS SWALLOWED,
    AND ANYTHING ELSE IS LEFT TO BE SEEN BY LATER ##MORE##'S
    (AND EVENTUALLY BY READ).  THE STATE OF THE ##MORE## INTERRUPT 
    MAY STILL BE TOGGLED BY TYPING <CONTROL-UNDERSCORE>M  AT LISP, 
    AS WITH ANY OTHER ITS JOB.

[B] THE VARIOUS MOBYIO FEATURES IMPLEMETED ONLY ON THE AI MACHINE 
    (SUCH AS REAL AND FAKE TV'S, 340 STUFF, PLOTLIST AND MULTIPLEXOR
    ROUTINES) HAVE BEEN CODED AS AUTOLOAD PACKAGES FOR NEWIO.  THEY
    ARE VIRTUALLY UNTESTED, AND WE WOULD APPRECIATE IT IF TV AND 340
    HACKERS WOULD GIVE THEM A TRY AND HELP FIND THE BUGS.

[C] .LISP. (INIT) FILES ARE NOT HANDLED VIA THE UREAD MECHANISM
    IN NEWIO.  A STANDARD TRICK IN OLDIO, NOT USABLE IN NEWIO, IS TO 
    CALL UREAD IN THE LAST FORM IN AN INIT FILE, AND DEPEND ON IT TO
    CLOSE THE INIT FILE BEFORE OPENING THE NEW ONE.  SINCE THIS 
    DOESN'T WORK IN NEWIO, IT MAY HAPPEN THAT AN .INIT. FILE IS NEVER
    CLOSED.  THERE ARE TWO SOLUTIONS:
	(1) LET THE .INIT. FILE EXPLICITLY CLOSE ITSELF, AND POP THE 
	    INPUT STACK, DURING THE EVALUATION OF THE LAST FORM. E.G.
		(COMMENT CORE 120 . . .)	;RELIC FOR ALLOC
		(DO SOME STUFF)
			. . .			;MORE STUFF
		(PROGN (CLOSE INFILE) (INPUSH -1))
	(2) ARRANGE NOT TO RESET ↑Q TO NIL IN THE INIT FILE, SO THAT
	    THE TOP-LEVEL READ-EVAL-PRINT LOOP WILL ENCOUNTER
	    END-OF-FILE AND CLOSE IT FOR YOU.

[D] THE OLD MESSAGE ABOUT
	;REFERENCE TO NON-EXISTENT MEMORY FROM LOCATION 314159
	;PROGRAM TRAPPED WHILE IN COMPLETELY-CRETINOUS-ROUTINE
    HAS BEEN FLUSHED IN NEWIO.  NOW, WHEN A MEMORY PROTECT VIOLATION,
    WRITE INTO READ-ONLY MEMORY, ILLEGAL OPERATION, OR PARITY ERROR
    OCCURS, NEWIO CHECKS THE VALUE OF THE ATOM "MACHINE-ERROR",
    AS PREVIOUSLY DOCUMENTED.  IF NON-NIL, IT IS THE USER HANDLER
    FOR THE ERROR.  IF NIL, LISP REFLECTS THE INTERRUPT BACK OUT,
    AND DDT HANDLES IT, PRINTING THE FAMILAR MESSAGE:
	MPV; 314159>>MOVE 1,(2)   1/   43   271828/   ??
    WHICH MAY SEEM SOMEWHAT MORE CRYPTIC, BUT WILL MAKE IT MUCH EASIER
    FOR KNOWLEDGEABLE LISP HACKERS TO DEBUG THE ERROR.  TO GET THE
    EFFECT OF THE OLD HANDLER (RETURN TO TOP LEVEL), TYPE $G TO DDT.
    SYSTEMS SUCH AS MACSYMA WHICH REQUIRE A BETTER USER INTERFACE SHOULD
    PROVIDE A MACHINE-ERROR USER INTERRUPT HANDLER.

[E] ALL TTY BLOCK OUTPUT IN NEWIO IS NOW DONE WITH SIOT.
    AS A COROLLARY, A FILE WRITTEN IN TTY BLOCK IMAGE OUTPUT MODE
    WILL WRITE 8-BIT CHARACTERS, AND TTY BLOCK FIXNUM OUTPUT
    WILL WRITE 12.-BIT CHARACTERS.  SUPER SYSTEMS HACKERS TAKE NOTE!

[F] BUG OF FASLOAD FROM WITHIN FASLOAD-FILE-NOT-FOUND BREAK FIXED.
    WHEN YOU GET A FILE-NOT-FOUND ERROR FROM FASLOAD, IT NOW WORKS
    TO REPEAT THE FASLOAD WITHOUT EXITING FROM THE BREAK.

[G] THE KLUDGE WHERE LISP'S TOP-LEVEL AND BREAK-LEVEL SWALLOW A
    SPACE AFTER AN ATOM DOES NOT HAPPEN IF THE USER SUPPLIED A
    READ FUNCTION BY SETQ'ING THE VARIABLE "READ".

[H] NEW CURSORPOS FEATURES: A, H, I, V
	(CURSORPOS 'A) ADVANCES TO A FRESH LINE; THAT IS,
		IT DOES A TERPRI UNLESS THE TTY IS ALREADY
		AT THE BEGINNING OF A LINE.
	(CURSORPOS 'P) (OUTPUT A ↑P) HAS BEEN FLUSHED.
		(TYO 20) NOW DOES THE RIGHT THING IN NEWIO.
	(CURSORPOS 'H <N>) SETS JUST THE HORIZONTAL POSITION
		TO <N> WITHOUT AFFECTING THE VERTICAL POSITION.
	(CURSORPOS 'V <N>) SIMILARLY SETS THE VERTICAL POSITION.
	(CURSORPOS 'I <N>) OUTPUTS ASCII CODE <N> AS A ONE-POSITION
		PRINTING CHARACTER (WILL NOT WORK UNTIL IMPLEMENTED
		IN ITS, WHICH ISN'T YET!).

[I] THE ACTION AT END-OF-FILE, CONTRARY TO THE MOONUAL, IS NOW:
	IF WITHIN READ IN THE MIDDLE OF AN OBJECT (TYI CANNOT BE
		"IN THE MIDDLE OF AN OBJECT") SIGNAL A READ-EOF ERROR.
	OTHERWISE, IF NO USER EOF HANDLER BELONGS TO THE FILE,
		THEN CLOSE THE FILE UNLESS IT IS A TTY
		(EOF ON A TTY MERELY MEANS OVER-RUBOUT),
		POP THE INPUT STACK (BY DOING (INPUSH -1)),
		THEN IF WITHIN A READ THAT HAD ARGUMENTS
		RETURN THE EOF VALUE, AND OTHERWISE REPEAT
		THE READ FROM THE NOW CURRENT FILE POPPED.
	IF THERE WAS A USER EOF HANDLER,
		THEN CALL IT WITH THE FILE AND EOF VALUE AS
		ARGUMENTS.  WHEN IT RETURNS, THEN
		IF IT RETURNED NIL, CLOSE THE FILE (UNLESS
			IT IS A TTY) AND POP THE INPUT STACK,
			THEN REPEAT THE READ FROM THE NEW CURRENT
			INPUT FILE.
		IF IT RETURNED T, REPEAT THE READ USING WHATEVER
			SOURCE THE EOF HANDLER MADE CURRENT.
		IF IT RETURNED ANY OTHER VALUE, THEN
			IF NOT WITHIN A READ WITH ARGUMENTS,
			PRETEND IT RETURNED NIL.
			OTHERWISE, EXIT THE READ WITH THE VALUE
			RETURNED BY THE EOF HANDLER.
    IN THE ABOVE, "READ" REFERS TO WHATEVER INPUT FUNCTION WAS
    CALLED, SUCH AS READ, READLINE, TYI, ETC.

THURSDAY  JULY 01,1976   NM+4D.11H.48M.23S.  LISP 1168  - GLS -

[1] HUNK STUFF HAS CHANGED; HUNK,HUNKIFY => MAKHUNK,HUNK
[2] TOPLEVEL AND BREAKLEVEL FLUSH SPACES AFTER ATOMS
[3] PRINT IS MORE CLEVER ABOUT AUTO-TERPRI AND PRINLEVEL
[4] NEW FUNCTION "SUBR" FINDS ROUTINE A PC IS IN
FOR NEWIO ONLY:
[A] MAR-BREAK INTERRUPT TURNS OFF MAR
[B] ALL THE NEW INTERRUPTS RUN IN (NOINTERRUPT T) STATE
[C] THE VARIABLE DEFAULTF IS THE DEFAULT FILE NAMES
[D] MACHINE-ERROR INTERRUPT NOW GETS MORE ARGUMENTS
----------------------------------------------------------------
[1] THE HUNK STUFF HAS BEEN REVISED AS FOLLOWS:
	(CXR 0 X) = (CDR X), (CXR 1 X) = (CAR X)
    THIS IS THE REVERSE OF WHAT IT INITIALLY WAS.  THE OTHER 
    COMPONENTS ARE STILL COMPONENTS 2 THROUGH N-1.
    THE OLD "HUNKIFY" FUNCTION HAS BEEN RENAMED "HUNK".
    IT TAKES ITS ARGUMENTS IN THE ORDER 1, 2, 3, ..., N-1, 0.
    THIS IS THE ORDER THEY ARE PRINTED IN.  THUS:
	(SETQ FOO (HUNK 1 2 3 4 5))
		(1 . 2 . 3 . 4 . 5)
	(CXR 1 FOO)
		1
	(CXR 2 FOO)
		2
	(CXR 0 FOO)
		5
    THE OLD "HUNK" FUNCTION HAS BEEN RENAMED "MAKHUNK".
    IT ALSO HAS AN EXTENDED DEFINITION:  IF THE ARGUMENT TO
    MAKHUNK IS A FIXNUM, IT CREATES A HUNK THAT BIG FILLED
    WITH NILS.  IF THE ARGUMENT IS A LIST, IT CREATES A HUNK
    FILLED WITH THE ELEMENTS OF THE LIST.  THUS
	(MAKHUNK (LIST A B C D)) = (HUNK A B C D)
[2] IN THE SYSTEM-SUPPLIED TOPLEVEL AND BREAKLEVEL
    READ-EVAL-PRINT LOOPS, JUST AFTER AN ITEM IS READ THE
    FOLLOWING OCCURS:
	(AND (ATOM THE-ITEM)
	     (NOT (ZEROP (BOOLE 1 100000
				(STATUS SYNTAX (TYIPEEK)))))
	     (TYI))
    IN THIS WAY THE SPACE THAT TERMINATED THE ATOM (IF IT WAS
    IN FACT A SPACE) IS FLUSHED.  THIS IS SO THAT THE SPACE
    WILL NOT HANG AROUND AND CONFUSE, E.G., **MORE**
    PROCESSING.  USER TOPLEVELS AND BREAKLEVELS SHOULD DO
    A SIMILAR THING.
    I WOULD APPRECIATE GETTING COMMENTS ABOUT THIS GENERAL
    PROBLEM ABOUT SPACES AFTER ATOMS.  SHOULD THERE BE TWO
    READ FUNCTIONS, ONE WHICH FLUSHES SPACES AND ONE WHICH
    DOES NOT?  OR WHAT?  -- GLS
[3] A NEW USELESS FEATURE OF PRINT IS THAT THE AUTO-TERPRI
    HACK IS MORE CLEVER.  UP TO NOW PRINT HAS CALCULATED
    THE SIZE OF EACH ATOMIC SYMBOL AND PUT A TERPRI (CARRIAGE
    RETURN) BEFORE THE SYMBOL IF IT WON'T FIT ON THE CURRENT OUTPUT
    LINE.  NOW IT CALCULATES OR ESTIMATES THE LENGTH OF EACH ATOM
    (NUMBERS, ETC., AS WELL AS SYMBOLS), AND ALLOWS FOR ANY
    PARENTHESES WHICH MUST PRECEDE OR FOLLOW THE ATOM.  THUS,
    IF THE NEXT FRAGMENT TO PRINT IS "((FOOBAR)))", PRINT
    WILL TERPRI IF THERE ARE NOT AT LEAST ELEVEN CHARACTERS
    LEFT IN THE OUTPUT LINE.  THIS MEANS THAT YOU DON'T GET
    ISOLATED LEFT PARENS AT THE END OF A LINE, OR RIGHT PARENS
    AT THE BEGINNING OF A LINE.
[4] THE NEW FUNCTION "SUBR" (ONLY IN BIBOP LISPS, FOR OBSCURE
    TECHNICAL REASONS), TAKES ONE ARGUMENT, A FIXNUM, AND TRIES
    TO DETERMINE WHAT FUNCTION THAT NUMBER WOULD BE A PC IN.
    THIS HACK IS ONLY APPROXIMATE, AND DEPENDS ON LOOKING AT ALL
    THE PROPERTY LISTS OF ATOMS IN THE CURRENT OBARRAY.
    THE ATOM WITH THE CLOSEST REASONABLE SUBR, FSUBR, LSUBR,
    OR ARRAY PROPERTY IS RETURNED AS THE RESULT.
    IF NO REASONABLE RESULT IS FOUND, THE ATOM "?" IS RETURNED.
    (WHAT THIS DOES IS PROVIDE A HANDLE ON AN INTERNAL ROUTINE
    LISP HAS HAD FOR A LONG TIME ANYWAY.  SEE ITEM [D] BELOW.)

FOR NEWIO ONLY:

[A] WHEN THE MAR-BREAK USER INTERRUPT GOES OFF, AN IMPLICIT
    (SSTATUS MAR 0 NIL) HAS BEEN PERFORMED.  IT IS UP TO
    THE MAR-BREAK FUNCTION TO RE-ENABLE THE MAR IF DESIRED.
    THIS IS SIMILAR TO THE OPERATION OF THE ALARMCLOCK
    FUNCTION.  THE INTENTION IS TO HELP PREVENT INFINITE LOOPS.
[B] ALL THE NEW ASYNCHRONOUS INTERRUPTS ANNOUNCED LAST TIME, NAMELY
    MAR-BREAK, SYS-DEATH, AND TTY-RETURN, ARE RUN IN (NOINTERRUPT T)
    MODE JUST LIKE TTY CHARACTER INTERRUPTS.  (I FORGOT TO DOCUMENT
    THIS LAST TIME.)
[C] THE VARIABLE DEFAULTF NOW CONTAINS NEWIO'S DEFAULT FILE NAMES,
    IN THE FORM OF A NAMELIST.  THIS IS SO YOU CAN LAMBDA-BIND
    THEM.  THE FUNCTION DEFAULTF STILL EXISTS AND IS EQUIVALENT
    TO:
		(DEFUN DEFAULTF (X)
		       (SETQ DEFAULTF
			     (MERGEF (OR X DEFAULTF) DEFAULTF)))
[D] THE MACHINE-ERROR INTERRUPT HAS BEEN CHANGED TO TAKE FOUR
    ARGUMENTS.  THEY ARE A SYMBOL AND THREE FIXNUMS, IN THAT ORDER
    (THIS INVOLVES A REVERSAL OF ITS FORMAR ARGUMENTS.)  THE SYMBOL
    STILL INDICATES THE ERROR TYPE.  THE THREE FIXNUMS ARE,
    IN ORDER, THE LOCATION OF THE ERROR, THE PC AS OF THE ERROR,
    AND THE JPC AS OF THE ERROR.  FOR THE NONCE, THE FIRST AND THIRD
    FIXNUMS ARE ALWAYS ZERO, BUT EVENTUALLY WILL CONTAIN INFORMATION
    AS CORRECT AS ITS CAN SUPPLY.
    AS AN EXAMPLE OF A MACHINE-ERROR FUNCTION, THIS ONE DOES
    APPROXIMATELY WHAT THE SYSTEM DEFAULT HANDLER DOES:
	(DEFUN MACHINE-ERROR-HANDLER (TYPE LOC PC JPC)
	       (TERPRI)
	       (PRINC (COND ((EQ TYPE 'EXAMINE)
			     '|;REFERENCE TO NON-EXISTENT MEMORY|)
			    ((EQ TYPE 'DEPOSIT)
			     '|;WRITE INTO READ-ONLY MEMORY|)
			    ((EQ TYPE 'EVAL)
			     '|;ILLEGAL MACHINE OPERATION|)
			    ((EQ TYPE 'ODDP)
			     '|;PARITY ERROR|)))
	       (PRINC '| FROM LOCATION |)
	       (PRIN1 PC)
	       (TERPRI)
	       (PRINC '|;PROGRAM TRAPPED WHILE IN |)
	       (PRIN1 (SUBR PC))	;SEE ITEM [4] ABOVE FOR SUBR
	       (ERROR))
    ANOTHER ONE TO USE IS:
	(DEFUN MACHINE-ERROR-HANDLER (TYPE LOC PC JPC)
	       ((LAMBDA (ARGS)
			(BREAK MACHINE-ERROR))
		(LIST (COND ((EQ TYPE 'EXAMINE)
			     'REFERENCE-TO-NON-EXISTENT-MEMORY)
			    ((EQ TYPE 'DEPOSIT)
			     'WRITE-INTO-READ-ONLY-MEMORY)
			    ((EQ TYPE 'EVAL)
			     'ILLEGAL-MACHINE-OPERATION)
			    ((EQ TYPE 'ODDP)
			     'PARITY-ERROR))
		      'AT
		      'LOCATION
		      LOC
		      'FROM
		      'WITHIN
		      (SUBR PC))))
    WHEN THE BREAK OCCURS, THE VARIABLE ARGS, FOLLOWING CONVENTION,
    HAS THE USEFUL DATA.

TUESDAY  JUNE 15,1976   FM+3D.2H.27M.33S.   LISP 1160  - GLS -

NOTE THAT NUMBERED ITEMS ARE FOR BOTH NEWIO AND OLDIO,
WHILE LETTERED ITEMS ARE FOR NEWIO ONLY.  NOTE ALSO THAT
NUMBERED AND LETTERED ITEMS ARE INTERMIXED SLIGHTLY.

[0] NEW COMPILER FEATURES
	[0A] (PROGN 'COMPILE A1 ... AN) AT TOP LEVEL COMPILES A1 ... AN
	[0B] (DEFUN (FOO BAR) ...) PULLS A SPECIAL GENSYM HACK
	[0C] (RECOMPL '(A B C ...)) IS USED TO RECOMPILE A FILE
	[0D] THE COMPILER NOW RECOGNIZES (CGOL) SPECIALLY
[1] THE VARIABLE ZFUZZ CONTROLS PRECISION OF PLUS AND DIFFERENCE
[2] DEFPROP AND DEFUN DO A REMPROP LOOP, NOT JUST A SINGLE REMPROP
[3] P% IS "LISP TYPEOUT MODE", AND GETS SET UP IN & IF POSSIBLE
[A] TYI ARRANGES TO READ NON-ACTIVATION CHARACTERS
[B] TYI ON TTY DOESN'T CONFUSE CURSORPOS ANY MORE
[C] THE VARIABLES TYI AND TYO CONTAIN THE INITIAL TTY FILE OBJECTS
[D] SETQ OF READ NOW WORKS IN NEWIO; "LOAD" USES IT TOO
[E] RECALL THAT HH$X IS BB$X IN NEWIO
[F] SPECIAL TREATMENT OF CTRL AND META CHARACTERS IN NEWIO
[G] MAR INTERRUPT FEATURE
	[F1] THE MAR-BREAK USER INTERRUPT
	[F2] (STATUS MAR) AND (SSTATUS MAR)
	[F3] SUSPEND SAVES AND RESTORES THE MAR
	[F4] ↑G CIRCUMVENTS THE MAR ON RESTORED VARIABLES
[H] OTHER NEW USER INTERRUPTS
	[G1] TTY-RETURN (TTY JUST RETURNED TO THE JOB)
	[G2] SYS-DEATH AND (STATUS ITS)
	[G3] MACHINE-ERROR (MEMORY ERRORS, ILLEGAL OPERS, PARITY ERRORS)
[4] HUNKS PACKAGE
	[5A] NEW DATA TYPES
	[5B] NEW PRIMITIVES: CXR, RPLACX, HUNK, HUNKIFY, HUNKSIZE
	[5C] EQUAL AND SXHASH TREAT HUNKS SPECIALLY
	[5D] PRINT TREATS HUNKS SPECIALLY
	[5E] TREATMENT OF HUNKS AS LIST STRUCTURE
	[5F] (STATUS FEATURE HUNK)
	[5G] (STATUS SPCNAMES)
	[5H] (STATUS GCSIZE), ETC., AND (ALLOC X)
[I] HUMBLE PACKAGE FOR HACKING INFERIOR JOBS ON ITS
	[I1] SPECIAL VARIABLES AND THE JOB TABLE
	[I2] CREATE-JOB
	[I3] SELECT-JOB
	[I4] KILL-JOB
	[I5] LOAD-JOB
	[I6] JOB-USET-READ AND JOB-USET-WRITE
	[I7] EXAMINE-JOB AND DEPOSIT-JOB
	[I8] *ATTY AND *DTTY
	[I9] AUXILIARY PACKAGES
----------------------------------------------------------------
[0] NEW COMPILER FEATURES
	[0A] IF THE FORM (PROGN 'COMPILE A1 ... AN) IS SEEN
	     AT THE TOP LEVEL OF A FILE, THE COMPILER COMPILES
	     THE FORMS A1 ... AN AS IF THEY ALL WERE SEEN AT TOP LEVEL.
	     IN THIS WAY A MACRO CAN "RETURN MULTIPLE FORMS" TO BE
	     COMPILED (AFTER ALL, THE CONSTRUCT ALSO WORKS IN THE
	     INTERPRETER).
	[0B] (DEFUN (FOO BAR) ...) IN THE INTERPRETER DEFINES FOO
	     TO HAVE A BAR PROPERTY WHICH IS A LAMBDA EXPRESSION.
	     THE COMPILER CREATES A GENSYM G0034, OUTPUTS THE FORM
			(DEFPROP FOO G0034 BAR),
	     AND THEN COMPILES THE FUNCTION UNDER THE NAME G0034.
	     IN THIS WAY (FUNCALL (GET 'FOO 'BAR) ...) WILL ALWAYS
	     WORK, FOR EXAMPLE.
	     CONTRAST THIS WITH (DEFUN (FOO BAR BAZ) ...), WHICH
	     IN THE INTERPRETER GIVES FOO A BAR PROPERTY, AND WHEN
	     COMPILED GIVES FOO A BAZ PROPERTY.
	[0C] THE VARIABLE RECOMPL, IF NON-NIL, CAUSES THE COMPILER
	     TO IGNORE ALL FORMS IN A FILE EXCEPT DECLARATIONS
	     AND FUNCTIONS WHOSE NAMES APPEAR IN THE LIST WHICH
	     IS THE VALUE OF RECOMPL.  THE FUNCTION RECOMPL
	     APPENDS ITS ARGUMENT TO THE RECOMPL LIST.  THE IDEA
	     IS THAT ONE CAN SPECIFY TO THE COMPILER WHICH FUNCTIONS
	     IN A FILE HAVE CHANGED, AND PRODUCE AN "UPDATE" FASL
	     FILE CONTAINING ONLY THE DIFFERENCES.
	[0D] THE COMPILER NOW RECOGNIZES THE FORM (CGOL), AND
	     TREATS IT SOMEWHAT LIKE (DECLARE (EVAL (READ))) (CGOL).
[1] IF THE VARIABLE ZFUZZ IS NON-NIL, THEN PLUS AND DIFFERENCE
    PERFORM A SPECIAL FUZZ CHECK ON FLOATING POINT NUMBERS.
    IF A AND B ARE THE NUMBERS TO BE ADDED (POSSIBLY AFTER CONTAGIOUS
    CONVERSION TO FLOATING POINT), THEN IF
		A + B < B * ZFUZZ
    THEN THE RESULT IS FORCED TO ZERO.
    THIS HACK WAS INVENTED FOR BMT; IT MAY CHANGE IF HE DECIDES IT
    ISN'T THE RIGHT THING.
[2] BEFORE PUTTING THE NEW PROPERTY ON AN ATOM, DEFPROP AND DEFUN
    USED TO PERFORM A SINGLE REMPROP OF THE PROPERTY.  NOW THEY LOOP,
    REMOVING ALL INSTANCES OF THE PROPERTY FROM THE ATOM.  THIS IS
    TO ALLOW FOR TRACE, WHICH CREATES ATOMS WITH MULTIPLE OCCURRENCES
    OF A GIVEN PROPERTY NAME.
[3] FOR THOSE WHO HACK LISP FROM DDT:
    THE SYMBOL P% IS A PUSHJ INSTRUCTION SUITABLE FOR USE AS A DDT
    USER TYPEOUT MODE (BY DEPOSITING IT INTO ..TAMPER OR SOME SIMILAR
    LOCATION).  IF WHEN THE LISP IS STARTED UP DDT HAS A SYMBOL TABLE
    LOADED FOR THE LISP, LISP MOVES THE TYPEOUT MODE IN ..TAMPER
    TO ..TPERCE, AND DEPOSITS P% IN ..TAMPER.  IN THIS WAY THE DDT
    COMMAND & MEANS LISP TYPEOUT MODE, AND SQUOZE TYPEOUT MAY BE DONE
    VIA $%;.
    THIS FORM OF LISP TYPEOUT MODE TYPES OUT $Q, NOT THE CONTENTS
    OF . AS P.$X AND PL.$X DO.  IF $Q HAS A NON-ZERO LEFT HALF,
    THEN BOTH THE LEFT AND RIGHT HALVES ARE PRINTED AS S-EXPRESSIONS,
    SEPARATED BY ",,".  THIS TYPEOUT MODE IS USEFUL IN CONJUNCTION
    WITH THE "RAID REGISTER" FEATURE OF DDT ($V).

REMEMBER, LETTERED ITEMS ARE FOR NEWIO ONLY!

[A] WHEN INPUTTING FROM A TTY USING THE TYI FUNCTION (AS OPPOSED TO
    READ OR READLINE), NEWIO ARRANGES TO SET THE %TIACT BIT.
    THE EFFECT OF THIS IS TO READ ANY CHARACTER IMMEDIATELY, EVEN
    IF NO ACTIVATION CHARACTER HAS BEEN TYPED YET.  THIS WILL
    ALLEVIATE THE SCREW INVOLVING (STATUS TTY) FOR MOST PEOPLE.
[B] MANY PLACES IN NEWIO ARE NOW MUCH MORE CLEVER ABOUT UPDATING
    THE CHARPOS AND LINENUM OF A TTY OUTPUT FILE WHEN INPUT HAS
    BEEN DONE ON THE ASSOCIATED TTY.  IN PARTICULAR, THE TYI
    FUNCTION AND THE PRE-SCAN FUNCTION FOR READ BOTH UPDATE THINGS
    CORRECTLY.  THE VARIOUS DDT TYPEOUT HACKS ALSO ARRANGE TO
    UPDATE THINGS CORRECTLY.
[C] THE VARIABLES TYI AND TYO NOW COME INITIALIZED RESPECTIVELY TO
    THE INITIAL TTY INPUT AND OUTPUT FILE OBJECTS.  T STILL WORKS
    AS AN ARGUMENT TO MOST I/O FUNCTIONS, BUT TO AVOID AMBIGUITIES
    USE THE OBJECTS IN TYI AND TYO.  ALSO, SEVERAL PLACES IN NEWIO
    WHICH USED TO SUPPLY A T FOR A FILE OBJECT NOW SUPPLY THE TTY
    FILE OBJECT ITSELF, PARTICULARLY THE PLACE THAT SUPPLIES ARGUMENTS
    TO INTERRUPT FUNCTION.
[D] NEWIO NOW UNDERSTANDS THAT IF THE VARIABLE READ IS NON-NIL IT IS
    A USER READ FUNCTION.  THE LOAD FUNCTION, WHEN LOADING AN EXPR FILE,
    USES THIS USER READ FUNCTION ALSO.
[E] MORE FOR DDT HACKERS: SINCE THE ↑H BREAK WAS RENAMED THE ↑B BREAK
    IN NEWIO, THE HH$X HACK IS CALLED BB$X IN NEWIO.
[F] IF AN INPUT TTY IS OPEN IN 12-BIT MODE, THE DEFAULT READ PRE-SCAN
    FUNCTION TRIES TO THROW AWAY INTERRUPT CHARACTERS.  THIS IS SO
    THAT TOP CHARACTERS CAN GO THROUGH AS ALPHABETICS, WITHOUT LETTING
    CONTROL CHARACTERS CONFUSE THE READER.
    IT HAS ALWAYS BEEN TRUE THAT IF A TTY INPUT INTERRUPT FUNCTION WAS
    REALLY A NUMBER, THEN IT MEANT THAT THE "INTERNAL" INTERRUPT
    ACTION SPECIFIED BY THAT NUMBER WAS TO BE TAKEN; FURTHERMORE,
    IF THE 200 OR 400 BIT WAS SET IN THE NUMBER, THE CTRL OR META
    BIT WAS REQUIRED TO BE PRESENT IN THE TYPED CHARACTER (THIS
    WAS SO THAT CTRL/G WOULD QUIT BUT "PI" WOULD NOT, FOR INSTANCE).
    A NEW TWIST IS THAT THE 200000000 AND 400000000 (200 AND 400 IN THE
    LEFT HALF) BITS REQUIRE THE ABSENCE OF THE CTRL AND META BITS
    IN THE TYPED CHARACTER FOR THE INTERRUPT ACTION TO TAKE PLACE.
    THUS, FOR EXAMPLE:
	(SSTATUS TTYINT 7 207)		;CTRL/G AND META/CTRL/G QUIT
	(SSTATUS TTYINT 7 607)		;ONLY META/CTRL/G QUITS
	(SSTATUS TTYINT 7 400000207)	;CTRL/G QUITS, BUT NOT META/CTRL/G
	(SSTATUS TTYINT 600000007)	;"PI" QUITS, BUT NOT CTRL/G OR META/CTRL/G
[G] MAR INTERRUPT FEATURE
    AT LONG LAST, THE MAR BREAK IS AVAILABLE TO THE LISP USER!
    THIS IS A FEATURE WHICH DETECTS WHEN A GIVEN MEMORY LOCATION IS
    REFERENCED AND GIVES AN INTERRUPT.
	[F1] THE VARIABLE MAR-BREAK, IF NON-NIL, IS A USER INTERRUPT
	     FUNCTION WHICH IS CALLED WHEN THE MAR BREAK IS FIRED.
	     IT TAKES ONE ARGUMENT WHICH PRESENTLY IS ALWAYS NIL.
	[F2] (STATUS MAR) AND (SSTATUS MAR)
	     TO "ARM" THE MAR BREAK, IT IS NECESSARY TO SAY
		(SSTATUS MAR N LOC)
	     WHERE N CONTROLS WHEN THE MAR IS FIRED, AND LOC IS
	     THE PLACE TO MONITOR.  N MAY TAKE ON THE FOLLOWING VALUES:
			0	TURN OFF THE MAR FEATURE
			1	BREAK ON INSTRUCTION FETCH
			2	BREAK ON WRITE
			3	BREAK ON ALL REFERENCES
	     ON THE KL-10, THESE ADDITIONAL VALUES ARE REPUTED TO WORK:
			10	BREAK ON DATA READ
			11	BREAK ON READ AND FETCH
			12	BREAK ON READ AND WRITE, BUT NOT FETCH
			13	BREAK ON FETCH AND WRITE, BUT NOT READ
	     THE 4 BIT (EXEC VS. USER MODE) IS IGNORED (USER IS FORCED).
	     LOC IS ANY S-EXPRESSION; THAT CELL IS THE ONE MONITORED.
	     THUS (SETQ FOO (LIST 'A 'B))  (SSTATUS MAR 2 FOO)
	     WILL TRIP THE MAR BREAK IF THE LIST CELL IN FOO IS EVER
	     RPLACA'D OR RPLACD'D.  AS AN EXAMPLE:
		(DEFUN MAR-TRACER (X)
		       (TERPRI)
		       (PRINC '|NOW THE VARIABLE |)
		       (PRIN1 THE-MAR-VARIABLE)
		       (PRINC '| HAS THE VALUE |)
		       (PRIN1 (SYMEVAL THE-MAR-VARIABLE))
		       (SSTATUS MAR 2 (GET THE-MAR-VARIABLE 'VALUE)))
		(SETQ MAR-BREAK 'MAR-TRACER)
		(DEFUN MAR FEXPR (X)
		       (SETQ THE-MAR-VARIABLE (CAR X))
		       ;; MAKE SURE THE VARIABLE HAS A VALUE CELL
		       (COND ((NOT (BOUNDP THE-MAR-VARIABLE))
			      (SET THE-MAR-VARIABLE NIL)))
		       (SSTATUS MAR 2 (GET THE-MAR-VARIABLE 'VALUE)))
		(DEFUN UNMAR () (SSTATUS MAR 0 NIL))
		(MAR QUUX)
		(SETQ QUUX 5)
		NOW QUUX HAS THE VALUE 5
		(DO ((QUUX 0 (+ QUUX 1))) ((= QUUX 2)) (HACK QUUX))
		NOW QUUX HAS THE VALUE 0
		NOW QUUX HAS THE VALUE 1
		NOW QUUX HAS THE VALUE 2
		NOW QUUX HAS THE VALUE 5
		NIL
	     (STATUS MAR) RETURNS A 2-LIST DESCRIBING THE CURRENT STATE
	     OF THE MAR, OR NIL IF THE MAR IS NOT IN USE.  NOTE THAT
	     USING THE MAR FROM DDT WILL NOT CONFUSE LISP, AND LISP
	     TRIES NOT TO CONFUSE DDT.  IF LISP IS NOT USING THE MAR,
	     THEN IT DOESN'T EVEN TAKE THE MAR INTERRUPT FROM ITS,
	     AND SO DDT CAN TRAP IT.
	[F3] THE SUSPEND FUNCTION DOES ITS BEST TO SAVE AND RESTORE
	     THE STATE OF THE MAR.
	[F4] WHEN A ↑G FORCES A QUIT BACK TO TOP LEVEL, THE MAR BREAK
	     IS DISABLED DURING THE UNBINDING OF VARIABLES, AND
	     RE-ENABLED AFTERWARDS.  THIS IS BECAUSE DURING A QUIT
	     LISP IS NOT IN A GOOD STATE FOR RUNNING USER INTERRUPTS.
[H] OTHER NEW USER INTERRUPTS
	[G1] TTY-RETURN, IF NON-NIL, IS A USER INTERRUPT FUNCTION
	     WHICH IS RUN WHENEVER THE TTY IS GIVEN TO THE LISP JOB.
	     (THIS IS DRIVEN BY THE %PIATY BIT IN ITS.)
	     THIS IS USEFUL FOR TELLING LISP THAT SOME OTHER JOB
	     MAY HAVE MESSED UP THE SCREEN DISPLAY.
	     THE ARGUMENT TO THE FUNCTION IS PRESENTLY ALWAYS NIL.
	[G2] SYS-DEATH, IF NON-NIL, IS A USER INTERRUPT FUNCTION
	     WHICH IS RUN WHENEVER THE STATE OF THE SYSTEM IS GOING
	     DOWN, BEING REVIVED, OR BEGIN DEBUGGED.
	     (THIS IS DRIVEN BY THE %PIDWN AND %PIDBG BITS IN ITS.)
	     THE ARGUMENT TO THE FUNCTION IS PRESENTLY ALWAYS NIL.
	     USEFUL IN CONJUNCTION WITH THIS INTERRUPT IS (STATUS ITS).
	     THIS RETURNS A LIST OF FIVE NUMBERS:
		(1) THE TIME, IN SECONDS, UNTIL THE SYSTEM GOES DOWN,
		    AS A FLONUM,  -1.0 IF THE SYSTEM DOES NOT PLAN
		    TO GO DOWN,  OR -2.0 IF THE SYSTEM IS ALREADY DOWN.
		(2) A FIXNUM, NON-ZERO IF THE SYSTEM IS BEING DEBUGGED.
		(3) THE NUMBER OF USERS ON THE SYSTEM, AS A FIXNUM.
		(4) THE NUMBER OF MEMORY ERRORS THE SYSTEM HAS SURVIVED.
		(5) THE TIME IN SECONDS THE SYSTEM HAS BEEN UP,
		    AS A FLONUM.
	     THIS INFORMATION COMES FROM THE ITS "SSTATU" SYSTEM CALL.
	[G3] MACHINE-ERROR, IF NON-NIL, IS A USER INTERRUPT FUNCTION
	     WHICH IS RUN WHENEVER A MEMORY PROTECTION VIOLATION,
	     WRITE INTO READ-ONLY MEMORY, ILLEGAL OPERATION, OR
	     PARITY ERROR OCCURS.  THE FUNCTION RECEIVES TWO ARGUMENTS:
	     THE FIRST IS THE PROGRAM COUNTER WHEN THE ERROR OCCURRED
	     (NOT THE MEMORY LOCATION OF THE ERROR!), AND THE SECOND
	     IS A SYMBOL DESCRIBING THE TYPE OF ERROR:
		EXAMINE		ATTEMPT TO REFERENCE NON-EXISTENT MEMORY
		DEPOSIT		WRITE INTO READ-ONLY MEMORY
		EVAL		ILLEGAL OPERATION
		ODDP		PARITY ERROR
	     NOTE THAT THE LISP SYSTEM MAY INTERCEPT SOME OCCURRENCES
	     OF THESE ERRORS, SINCE THEY CAN BE USED FOR VARIOUS
	     SHARED-MEMORY HACKS.
	     IF THE USER INTERRUPT FUNCTION EVER RETURNS, THE PROGRAM
	     IS RESUMED AT THE PROGRAM COUNTER AS OF THE ERROR;
	     THAT IS, THE ERRONEOUS OPERATION IS RETRIED.  BEWARE
	     OF LOOPS!  IT IS EXPECTED THAT THE INTERRUPT FUNCTION WILL
	     NORMALLY ERROR OUT.
	     IF NO USER INTERRUPT FUNCTION IS SUPPLIED, LISP WILL
	     BEHAVE AS IT ALWAYS HAS, AND ERROR OUT TO TOP LEVEL.

THE NEXT FEATURE IS AVAILABLE IN ALL BIBOP LISPS, WHETHER OLDIO OR NEWIO.

[4] HUNKS PACKAGE
    THE HUNKS PACKAGE PROVIDES LISP WITH A KIND OF "RECORD" OR
    "SMALL VECTOR" FEATURE.  THE HUNK DATA TYPE INTERACTS SMOOTHLY
    WITH THE LIST DATA TYPE TO PROVIDE SOME INTERESTING CAPABILITIES.
	[5A] A NEW DATA TYPE IS INTRODUCED INTO LISP, THE "HUNK".
	     HUNKS ARE SHORT VECTORS OF S-EXPRESSIONS.  IN THE CURRENT
	     IMPLEMENTATION THERE ARE ACTUALLY SEVERAL SPACES OF
	     FOR HUNKS, VARIOUSLY CALLED HUNK4, HUNK8, HUNK16, ETC.
	     THESE WILL BE EXPLAINED IN DETAIL BELOW.  IN SOME
	     CONTEXTS ORDINARY LIST CELLS ARE CONSIDERED TO BE HUNKS
	     OF LENGTH 2.  HUNKS ARE NOT CONSIDERED TO BE ATOMS;
	     (ATOM H) RETURNS NIL FOR ANY HUNK H.
	[5B] (HUNKP X) IS A PREDICATE WHICH RETURNS T IFF X IS A HUNK.
		IN THIS CONTEXT A LIST CELL IS NOT CONSIDERED TO BE A HUNK.
	     (CXR N H) RETURNS THE N'TH ELEMENT OF THE HUNK H.
		(CXR 0 H) IS EQUIVALENT TO (CAR H), AND (CXR 1 H)
		IS EQUIVALENT TO (CDR H); IN FACT, THE CAR AND CDR
		FUNCTIONS MAY BE USED ON HUNKS AS WELL AS ON LISTS.
	     (RPLACX N H Z) REPLACES THE N'TH COMPONENT OF H WITH Z.
		THE VALUE OF RPLACX IS ITS (MODIFIED) SECOND ARGUMENT.
		THUS (RPLACX 0 H Z) IS EQUIVALENT TO (RPLACA H Z),
		AND (RPLACX 1 H Z) IS EQUIVALENT TO (RPLACD H Z).
	     (HUNK N) CREATES A HUNK OF SIZE N AND RETURNS IT.
		(HUNK 0) RETURNS NIL, AND (HUNK 1) OR (HUNK 2)
		RETURNS A LIST CELL.  ALL COMPONENTS ARE INITIALIZED
		TO NIL.  THE COMPONENTS ARE NUMBERED FROM 0 TO N-1.
	     (HUNKIFY A0 A2 ... AN-1) IS EQUIVALENT TO
			((LAMBDA (H)
				 (RPLACX 0 A0)
				 ...
				 (RPLACX N-1 AN-1))
			 (HUNK N))
		THAT IS, IT CREATES A HUNK WHOSE COMPONENTS ARE THE
		ARGUMENTS TO HUNKIFY.  NOTE THAT, AS FUNNY BOUNDARY
		CASES, (HUNKIFY) RETURNS NIL, AND (HUNKIFY X)
		IS THE SAME AS (NCONS X).
	     (HUNKSIZE H) RETURNS THE NUMBER OF COMPONENTS IN
	     THE HUNK H.  HUNKSIZE OF A LIST CELL IS 2; HUNKSIZE
	     OF NIL IS 0.
	[5C] EQUAL WILL COMPARE HUNKS BY DOING A RECURSIVE
	     COMPONENT BY COMPONENT COMPARISON.  SXHASH WILL
	     COMPUTE THE HASH ON THE BASIS OF ALL COMPONENTS.
	[5D] HUNKS ARE PRINTED USING AN EXTENSION TO DOT NOTATION
	     SUGGESTED BY RMS.  SINCE LIST CELLS ARE CONSIDERED TO
	     BE 2-HUNKS, AND ARE PRINTED AS (CAR . CDR), THE RESULT
	     OF (HUNKIFY A0 A1 A2 +++ AN-2 AN-1) IS PRINTED AS
	     (A0 . A2 . A3 . +++ . AN-2 . AN-1 . A1), WHERE "+++"
	     IS USED AS AN ELLIPSIS TO AVOID CONFUSION WITH THE
	     DOT NOTATION.  THUS WE HAVE:
		(HUNKIFY 0) => (0)
		(HUNKIFY 0 1) => (0 . 1)
		(HUNKIFY 0 1 2) => (0 . 2 . 1)
		(HUNKIFY 0 1 2 3) => (0 . 2 . 3 . 1)
	     THE REASON FOR THE STRANGE PLACEMENT OF A1 IS SO THAT
	     THE CDR WILL BE LAST.  THIS MAY SEEM RATHER KLUDGY, BUT
	     ACTUALLY LENDS ITSELF TO CERTAIN ELEGANT EXTENSIONS.
	     ONE IS A GENERAL EXTENSION OF THIS DOT NOTATION TO LIST
	     NOTATION.  AS AN EXAMPLE, CONSIDER:
		(A  B . C . D  E . F  G  H  I . J . K)
	     THIS IS HOW PRINT WOULD REPRESENT THE RESULT OF:
		(HUNKIFY 'A
			 (HUNKIFY 'B
				  (HUNKIFY 'E
					   (HUNKIFY 'G
						    (HUNKIFY 'H
							     (HUNKIFY 'I
								      'K
								      'J)))
					   'F)
				  'C
				  'D))
	     THE BASIC IDEA IS THAT CONSECUTIVE ITEMS SEPARATED BY DOTS
	     ALL BELONG TO THE SAME HUNK; ITEMS SEPARATED ONLY BY SPACES
	     BELONG TO DIFFERENT HUNKS, AND THE SECOND HUNK IS THE CDR
	     (I.E. THE (CXR 1)) OF THE FIRST HUNK.  ANOTHER WAY TO THINK
	     ABOUT IT IS TO REPLACE THE TWO PARENS BY SUPER-BRACKETS,
	     AND THEN BETWEEN TWO ITEMS SEPARATED BY SPACE BUT NOT DOT
	     INSERT ".(".  NOTE THAT THE DEFINITION OF (HUNKIFY X)
	     AS (NCONS X) CAUSES THE BOUNDARY CONDITION AT THE END OF
	     THE LIST TO WIN.
	     AS A SPECIAL CASE, IF THE CDR OF A HUNK (OTHER THAN A LIST
	     CELL) IS NIL, THAT NIL MAY BE ELIDED (BUT THE PRECEDING DOT
	     MAY NOT BE ELIDED!).  THUS:
		(HUNKIFY 1 (HUNKIFY 2 NIL 3 4) 5) => (1 . 5  2 . 3 . 4 .)
		(HUNKIFY 'A
			 (HUNKIFY 'B
				  (HUNKIFY 'C
					   NIL
					   'D)
				  'E)
			 'F)		=> (A . F  B . E  C . D .)
	     MAYBE EVENTUALLY READ WILL KNOW HOW TO READ THESE IN.
	[5E] MOST OTHER FUNCTIONS WHICH OPERATE ON LIST STRUCTURE
	     WILL TREAT HUNKS AS LIST CELLS, USING ONLY THE FIRST
	     TWO POINTERS.  (IN PARTICULAR, SUBST AND SUBLIS DO
	     NOT PRESENTLY KNOW ANYTHING SPECIAL ABOUT HUNKS;
	     HENCE (SUBST NIL NIL H) WILL NOT COPY A HUNK!)
	     EVAL ALSO TREATS HUNKS AS LIST CELLS; THUS THE EXPRESSION
		(PLUS . FIXNUM . SIMP  1  2  3)
	     EVALUATES TO 6, IGNORING "FIXNUM" AND "SIMP".
	     IMAGINE THE POSSIBILITIES FOR HACKING!
	[5F] (STATUS FEATURE HUNK) IS NON-NIL IFF LISP HAS THE HUNK STUFF.
	[5G] (STATUS SPCNAMES) WILL INCLUDE THE NAMES OF ALL THE ACTUAL
	     SPACES.  IN THE CURRENT IMPLEMENTATION HUNKS HAVE SPACES
	     FOR HUNKS OF VARIOUS POWERS OF TWO IN SIZE, NAMELY 4., 8.,
	     16., ... UP TO SOME LIMIT (PROBABLY 16., THOUGH IT IS AN
	     ASSEMBLY PARAMETER I CAN CHANGE IF ANYONE NEEDS IT).
	     A HUNK OF 11. POINTERS IS MADE USING ONE OF 16. POINTERS
	     AND MARKING 5. OF THEM AS UNUSED.  IT IS PROBABLY NOT
	     A GOOD IDEA TO DEPEND ON THIS IMPLEMENTATION, AS ONE CAN
	     IMAGINE MORE HACKISH IMPLEMENTATIONS (BUDDY BLOCK, ETC.).
	[5H] (STATUS GCSIZE), (STATUS GCMAX), (ALLOC T), AND SIMILAR
	     HACKS ALL KNOW ABOUT THE SPACE NAMES FOR HUNKS AS
	     RETURNED BY (STATUS SPCNAMES).

THIS LAST MESS IS IN NEWIO ONLY!

[I] HUMBLE PACKAGE FOR HACKING INFERIOR JOBS ON ITS
    LIBLSP;HUMBLE FASL CONTAINS A COLLECTION OF PRIMITIVES FOR
    HACKING INFERIOR JOBS FROM LISP.  SOME LESS PRIMITIVE PACKAGES
    WHICH USE HUMBLE ALSO EXIST; JLK IS A GOOD PERSON TO ASK.
	[I1] THE FOLLOWING SPECIAL VARIABLES ARE SACRED TO HUMBLE:
		     CURRENT-JOB
		     THE-JOB-INPUT-CHANNEL
		     THE-JOB-OUTPUT-CHANNEL
		     THE-JOB-INPUT-CHANNEL-FILE-OBJECT
		     THE-JOB-OUTPUT-CHANNEL-FILE-OBJECT
	     THE USER OF HUMBLE NEED CONCERN HIMSELF ONLY WITH
	     CURRENT-JOB.  IF NON-NIL, THIS IS THE JOB OBJECT FOR
	     THE CURRENT JOB.  HUMBLE USES TWO I/O CHANNELS, WHICH
	     ARE USED TO SERVE THE CURRENT JOB.
	     JOB OBJECTS ARE SIMILAR TO NEWIO FILE OBJECTS.  THEIR
	     FORMAT IS DOCUMENTED (AND SYMBOLS DEFINED) IN LISP;DEFNS >.
	     HUMBLE AND LISP MAINTAIN INTERNALLY A TABLE OF JOB OBJECTS
	     (KEPT AT LOCATION JOBTB).  IF A JOB OBJECT IS EVER GARBAGE
	     COLLECTED, GC PRINTS A MESSAGE AND .UCLOSE'S THE JOB.
	[I2] (CREATE-JOB <JOBINTFN> <CHNINTFN> <JNAME> <UNAME> <FOREIGN>)
	     CREATES A JOB OBJECT, AND MAKES IT CURRENT.
	     <JOBINTFN> AND <CHNINTFN> ARE THE INTERRUPT FUNCTIONS
	     TO BE USED IF AN INTERRUPT IS RECEIVED ON THE INFERIOR
	     OR ON THE I/O CHANNELS USED TO SERVICE INFERIORS,
	     RESPECTIVELY.  THEY RECEIVE ONE ARGUMENT, THE JOB
	     OBJECT OR FILE OBJECT ASSOCIATED WITH THE INTERRUPT.
	     <UNAME> AND <FOREIGN> ARE OPTIONAL ARGUMENTS.
	     <UNAME> = NIL (DEFAULT) MEANS YOUR UNAME.
	     <FOREIGN> = T (NON-DEFAULT) MEANS REQUIRE FOREIGN JOB.
	     CREATE-JOB RETURNS A LIST OF TWO THINGS:
		(1) ONE OF THE FOLLOWING ATOMS:
			INFERIOR, REOWNED, FOREIGN
		(2) THE NEWLY CREATED JOB OBJECT
	     IF <FOREIGN> WAS NON-NIL AND THE JOB WAS NOT FOUND,
	     NIL IS RETURNED.
	[I3] (SELECT-JOB <JOB>) MAKES THE SPECIFIED JOB CURRENT IN THE
	     EXPECTED MODE (FOREIGN OR NOT), RETURNING VALUES AS FOR
	     CREATE-JOB.
	[I4] (KILL-JOB) KILLS THE CURRENT JOB.
	[I5] (LOAD-JOB <FILENAME>) OPENS UP FILE <FILENAME> (SPECIFIED
	     AS A NEWIO NAMELIST OR NAMESTRING) AND LOADS IT INTO TH
	     CURRENT JOB AS A BINARY PROGRAM (USES THE LOAD SYSTEM CALL).
	     RETURNS:
		NIL	WON!
		BIN?	FILE NOT BIN
		FILE?	FILE NOT FOUND
	[I6] (JOB-USET-READ <NUM>) RETURNS VALUE OF USET VAR <NUM>,
	     OR NIL IF NO CURRENT JOB.
	     (JOB-USET-WRITE <NUM> <VAL>) WRITES USET VAR <NUM>,
	     THEN RETURNS T FOR SUCCESS OR NIL IF NO CURRENT JOB OR THE
	     CURRENT JOB IS FOREIGN.  <NUM> SHOULD HAVE THE 400000 BIT SET.
	[I7] (EXAMINE-JOB <LOC>) EXAMINES LOCATION <LOC> OF CURRENT JOB.
	     RETURNS NIL ON FAILURE (INDICATES BAD ERROR).
	     (DEPOSIT-JOB <LOC> <VAL>) DEPOSITS <VAL> IN <LOC> OF CURRENT JOB.
	     RETURNS NIL ON FAILURE (INDICATES BAD ERROR).
	[I8] (*ATTY) DOES A .ATTY TO THE CURRENT JOB; (*DTTY) DOES A .DTTY.
	     BOTH RETURN T FOR SUCCESS AND NIL FOR FAILURE.
	[I9] THERE EXIST PACKAGES OF MACROS AND HIGHER-LEVEL FUNCTIONS
	     FOR HACKING INFERIOR JOBS.  SEE JLK OR RZ FOR IDEAS.

MONDAY, MARCH 22,1976  FM+6D.22H.2M.17S.  LISP 1130  - GLS & JONL -

[1] (STATUS XUNAME) AND (STATUS XJNAME) NOW EXIST.
[2] FUNNY FORMAT DEFUN ALLOWS ARBITRARY PROPERTY NAMES
[3] PRIN1 DOES VERTICAL BAR AND LOOKAHEAD CLEVERNESS
[4] BREAK MAY TAKE ONE ARGUMENT, DEFAULTING THE SECOND TO T
[5] VALUE OF $P IS THE $P ATOM (NIL => NONE)
[6] *NOPOINT CONTROLS OUTPUT OF LEADING SUPRA-DECIMAL +
THE FOLLOWING CHANGES APPLY TO NEWIO ONLY:
[A] OPENI, OPENO, OPENA HAVE GONE AWAY
[B] (STATUS FILEMODE) RETURNS NIL IF GIVEN A CLOSED FILE.
[C] CLI-MESSAGE INTERRUPT HANDLER
[D] NEW FUNCTIONS: ALLFILES AND FRIENDS
[E] WHO-LINE STATUS CALLS
[F] (STATUS TTYTYPE <OUTPUT-TTY>) RETURNS TCTYP
[G] EXAMPLES OF KEYBOARD PRE-SCAN FUNCTIONS
----------------------------------------------------------------
[1] (STATUS XUNAME) AND (STATUS XJNAME) WERE ADDED AS AN
    AUGMENTATION TO (STATUS UNAME) AND (STATUS JNAME).
[2] THE "FUNCTION NAME" IN A DEFUN FORM MAY BE A 3-LIST;
    THE FIRST ELEMENT IS THE Hβ ↓ME, THE SECOND THE "EXPR"
    PROPERTY NAME, AND THE THIRD THE "SUBR" PROPERTY NAME.
    THAT IS, INSTEAD OF USING THE PROPERTY NAME "EXPR"
    (OR "FEXPR"), THE INTERPRETER WILL USE THE PROPERTY NAME
    WHICH IS THE SECOND ELEMENT, AND THE COMPILER WILL USE
    THAT WHICH IS THE THIRD NAME.  THE TYPE OF THE FUNCTION
    IS STILL DETERMINED BY THE OPTIONAL FLAG "FEXPR"
    AND WHETHER THE LAMBDA VARIABLE LIST IS ATOMIC.
	EXAMPLE:
		(DEFUN (FOO QEXPR QSUBR) (A B) ...)
	IN THE INTERPRETER PUTS A LAMBDA EXPRESSION UNDER
	THE "QEXPR" PROPERTY OF "FOO", AND IN THE COMPILER
	COMPILES A SUBR OF TWO ARGUMENTS HEADED BY THE
	LAP STATEMENT (LAP FOO QSUBR) INSTEAD OF
	(LAP FOO SUBR).
[3] MOSTLY FOR AESTHETIC REASONS, PRIN1 IS NOW MORE CLEVER
    ABOUT PRINTING ATOMS:
	(A) IF PRIN1 THINKS VERTICAL BARS WILL LOOK NICER
	    THAN SLASHES, IT WILL USE THEM.
	(B) IF IT LOOKS LIKE THE NEXT ATOM TO PRINT WILL
	    NOT FIT ON THE LINE, PRIN1 TRIES TO GET
	    A TERPRI IN BEFORE THE ATOM, THUS AVOIDING
	    SPLITTING AN ATOM ACROSS A NEWLINE.
    THESE HEURISTICS MAY BECOME EVEN MORE CLEVER IN THE FUTURE.
    PRINC DOES NOT USE ANY OF THESE HACKS.  FLATSIZE USES
    THE FIRST, BUT NOT THE SECOND.
[4] THE FORM (BREAK FOO) IS NOW THE SAME AS (BREAK FOO T).
[5] THE BREAK LOOP NO LONGER LOOKS FOR THE ATOM }P.
    INSTEAD, IT LOOKS FOR THE ATOM WHICH IS THE VALUE
    OF THE ATOM }P, WHICH IS INITIALLY SET TO '}P, SO IT
    WORKS AS BEFORE BHY DEFAULT.  IF }P IS NIL, THEN NO
    ATOM WILL SERVE THE }P FUNCTION.
[6] IF BASE IS GREATER THAN 10., *NOPOINT IF NON-NIL
    WILL SUPPRESS THE + WHICH NORMALLY PRECEDES POSITIVE
    SUPRA-DECIMAL NUMBERS.  FOR BASE = 10., *NOPOINT
    STILL SUPPRESSES THE TRAILING DECIMALLL POINT.

THE FOLLOWING CHANGES APPLY TO NEWIO ONLY:

[A] OPENI, OPENO, OPENA HAVE GONE AWAY.  USE OPEN
    WITH THE "IN", "OUT", OR "APPEND" OPTION IN THE
    SECOND ARGUMENT.
[B] (STATUS FILEMODE <FILE>) RETURNS NIL FOR A CLOSED FILE.
    FOR OPEN FILES, IT OPERATES AS IT ALWAYS HAS.
    FOR A NON-FILE, IT GIVES A WRNG-TYPE-ARG ERROR.
[C] THE ATOM "CLI-MESSAGE" HAS AS ITS VALUE THE USER
    INTERRUPT FUNCTION FOR THE CLI DEVICE INTERRUPT.
    THE FUNCTION GETS A SINGLE ARGUMENT OF NIL.
    IT SHOULD OPEN THE "CLA:" DEVICE IN RESPONSE TO
    THE INTERRUPT IN ORDER TOP READ THE MESSAGE.
    ONE OF THE OPTIONS IN OPEN'S SECOND ARGUMENT SHOULD
    BE "CLA" (AS OPPOSED TO "DSK" OR "TTY"); THIS CAUSES
    OPEN TO READ THE FIRST TWO WORDS OF THE FILE AND USE
    THEM AS THE FILE NAMES FOR THE TRUENAME FUNCTION.  TH  CLA: FILE SHOULD BE OPENED IN BLOCK MODE FOR THIS PURPOSE.
    THE DEFAULT CLI-MESSAGE FUNCTION IS NIL, I.E. IGNORE
    THE INTERRUPTS.
[D] FOUR NEW FUNCTIONS (AUTOLOADABLE) NOW EXIST FOR LOOKING
    AT FILE DIRECTORIES:  ALLFILES, DIRECTORY, MAPALLFILES,
    AND MAPDIRECTORY.

    (ALLFILES X) TAKES A LIST OF NAMELISTS (AND NAMESTRINGS) X AND RETURNS A LIST
    OF NAMELISTS IN THE FILE SYSTEM WHICH MATCH ELEMENTS OF X.
    THERE IS NO GUARANTEE AS TO THE ORDERING OF THE FILES IN
    THE RETURNED LIST.  IF A SORTED LIST IS DESIRED, THE SORTCAR
    FUNCTION SHOULD BE USED WITH AN APPROPRIATE PREDICATE.
    NOTE WELL THAT X IS A *LIST* OF NAMELISTS, AND NOT JUST
    A SINGLE NAMELIST; THIS IS AN INCOMPATIBILITY WITH THE ALLFILES
    FUNCTION DESCRIBED IN THE MOONUAL.

    EXAMPLE:  (ALLFILES '(|GLS;ALLFIL| ((DSK TGQ) * SONG) |* BIN|))
    RETURNS DESCRIPTORS FOR ALL FILES ON GLS'S DIRECTORY WITH
    FIRST NAME "ALLFIL", ALL SONGS ON TGQ, AND ALL DSK FILES IN
    ANY DIRECTORY WITH SECOND NAME "BIN".

    (DIRECTORY X) IS LIKE (ALLFILES X), BUT INSTEAD OF
    NAMELISTS IT RETURNS A LIST OF FILE DESCRIPTORS, WHERE
    EACH DESCRIPTOR HAS A NAMELIST IN THE CAR AND A
    PROPERTY LIST IN THE CDR.  TYPICAL PROPERTIES ARE:
   	WORDS		SIZE OF FILE IN PDP-10 WORDS
   	CHARACTERS	SIZE OF FILE IN ASCII CHARACTERS
   	BITS		SIZE IN BITS (TO BE IMPLEMENTED WHEN ITS SUPPORTS IT)
   	CREDATE		DATE OF CREATION
   	CRETIME		TIME OF CREATION
   	REFDATE		DATE OF MOST RECENT REFERENCE
   	LINK		NAME LINKED TO
   	PACK		PACK NUMBER
   	UNDUMPED	T IF FILE NOT YET BACKED UP ON MAGTAPE
   	NOREAP		T IF NO REAP BIT IS SET
   
    (DIRECTORY X PROPS) IS SIMILAR, BUT INCLUDES ONLY
    THE PROPERTIES MENTIONED IN "PROPS" FOR EFFICIENCY.
    AS A SPECIAL CASE, OMITTING "LINK" CAUSES LINKS NOT
    TO BE INCLUDED AT ALL.
   
    (MAPALLFILES FN X) IS LIKE (MAPC FN (ALLFILES X))
    BUT DOESN'T HAVE TO CONS UP THE WHOLE LIST AT ONCE.
   
    (MAPDIRECTORY FN X) AND (MAPDIRECTORY FN X PROPS)
    ARE SIMILAR.

    MATCHING:
    AT PRESENT, THE ONLY MATCHING CAPABILITIES IN ALLFILES
    ARE DIRECT NAME EQUALITY AND *, WHICH MATCHES ANYTHING.
    * AS A DEVICE NAME IMPLIES DSK.
    * AS A DIRECTORY NAME USES ALL DIRECTORIES FOR DSK,
    AND THE DEFAULT DIRECTORY FOR ALL OTHER DEVICES.
    IN THIS CONTEXT, AI, ML, MC, AND DM ARE *NOT* CONSIDERED
    TO BE DSK DEVICES; BUT IN OTHER CONTEXTS THEY ARE.

[E] (SSTATUS WHO1 A B C D) SETS THE .WHO1 USER VARIABLE TO
		<.BYTE 8 ? A ? B ? C ? D>
    IN MIDAS TERMINOLOGY.  A AND C MUST BE FIXNUMS; B AND D
    MUST BE FIXNUMS WITH ASCII VALUES, OR CHARACTER OBJECTS.
    (SSTATUS WHO2 X) AND (SSTATUS WHO3 X) SET THE .WHO2 AND
    .WHO3 USER VARIABLES.  X MAY BE A FIXNUM OR A SYMBOL;
    IN THE LATTER CASE THE FIRST SIX CHARACTERS ARE USED TO
    FORM A SIXBIT WORD.
    THE .WHON USER VARIABLES CAUSE INFORMATION TO BE DISPLAYED
    IN THE TERMINAL'S WHO-LINE.
    THE MEANING OF A, B, C, AND D IS AS FOLLOWS:
	VAR	BITS	MEANING
	A	200	IF 1, SUPPRESS ENTIRE WHO-LINE
		100	SUPPRESS SPACE BETWEEN HALVES OF .WHO2
		 70	MODE FOR PRINTING LEFT HALF OF .WHO2
			0	DO NOT PRINT
			1	DATE IN PACKED FORM:
				774000	YEAR MOD 100.
				  3600	MONTH (1=JANUARY)
				   174	DAY OF MONTH
			2	TIME IN FORTIETHS OF A SECOND,
				PRINTED AS HH:MM:SS.T
			3	TIME IN HALF-SECONDS,
				PRINTED AS HH:MM:SS
			4	OCTAL HALFWORD
			5	DECIMAL HALFWORD (NO . SUPPLIED)
			6	THREE SIXBIT CHARACTERS
			7	UNUSED
		  7	MODE FOR RIGHT HALF OF .WHO2
	B	177	IF NON-ZERO, PRINT BETWEEN HALVES OF
			.WHO2 AS AN ASCII CHARACTER
		200	IF 1, PRINT CHAR TWICE
	C	200	IF 1, SUPPRESS SPACE BETWEEN .WHO2
			PRINTOUT AND .WHO3 PRINTOUT
		OTHERWISE LIKE A, BUT FOR .WHO3.
	D	LIKE B, BUT FOR .WHO3.
    THAT IS, IF THE WHO-LINE IS PRINTED AT ALL, WHAT APPEARS
    AT THE END IS THE CHARACTERS:
		IIIIXX-JJJJ=KKKKYY+LLLL
    WHERE:
	IIII	IS THE RESULT OF PRINTING THE LEFT HALF
		OF .WHO2 AS SPECIFIED BY A'S 70 BITS.
	JJJJ	RIGHT HALF OF .WHO2, BY A'S 7 BITS.
	KKKK	LEFT HALF OF .WHO3, BY C'S 70 BITS.
	LLLL	RIGHT HALF OF .WHO3, BY C'S 7 BITS.
	XX	ZERO TO TWO CHARACTERS, SPECIFIED BY B.
	YY	ZERO TO TWO CHARACTERS, SPECIFIED BY D.
	-	SPACE, UNLESS A'S 100 BIT IS 1.
	=	SPACE, UNLESS C'S 200 BIT IS 1.
	+	SPACE, UNLESS C'S 100 BIT IS 1.
    EXAMPLE:
	(SSTATUS WHO1 166 0 144 '/!)
	(SSTATUS WHO2 'FOOBAR)
	(SSTATUS WHO3 (+ (LSH 1234 22) 3456))
    CAUSES "FOOBAR 1234!5678" TO APPEAR IN THE WHO-LINE.

    THE STATUS FORMS ARE AS FOLLOWS:
	(STATUS WHO1) RETURNS A LIST OF FOUR FIXNUMS.
	(STATUS WHO2) AND (STATUS WHO3) RETURN FIXNUMS.

[F] (STATUS TTYTYPE <OUTPUT-TTY>) RETURNS THE TCTYP VARIABLE
    FOR THE SPECIFIED OUTPUT TTY (IF OMITTED, THIS DEFAULTS
    TO T, THE STANDARD OUTPUT TTY).  THIS IS THE EXTENSION
    IN NEWIO TO OLDIO'S SETTING OF THE VARIABLE "TTY".
    FOR COMPATIBILITY, WHEN IT STARTS UP, NEWIO LISP DOES
	(SETQ TTY (STATUS TTYTYPE T)).
    POSSIBLE VALUES ARE:
	0	PRINTING CONSOLE
	1	GOOD DATAPOINT
	2	"LOSER" DATAPOINT
	3	IMLAC
	4	TEKTRONIX 4000 SERIES (FORMERLY ARDS)
	5	PDP-11 (KNIGHT) TV DISPLAY
	6	MEMOREX (FORMERLY HORIZONTAL ARDS)
	7	SOFTWARE TTY
	10	TERMINET
	11	TTY USING ASCII STANDARD DISPLAY SEQUENCES
    IN GENERAL, IT IS BETTER NOT TO USE THIS STATUS FUNCTION,
    BUT RATHER TO SAY (STATUS FILEMODE <OUTPUT-TTY>) AND
    LOOK FOR FLAGS SUCH AS "RUBOUT" AND "CURSORPOS".

[G] EXAMPLES OF KEYBOARD PRE-SCAN FUNCTIONS.

(1) THE KEYBOARD PRE-SCAN FUNCTION IS THE ONE SET BY
    (SSTATUS TTYSCAN ...).  IT IS THE FUNCTION WHICH HANDLES
    RUBOUT AND ↑L PROCESSING.  AS AN EXAMPLE, THE FUNCTION
    GIVEN HERE IS A VERY CLOSE APPROXIMATION TO THE DEFAULT
    PROVIDED BY LISP.

------------------------------------------------------------
SAMPLE TTY PRESCAN FUNCTION -- APPROXIMATELY THE ONE IN LISP
------------------------------------------------------------
(DECLARE (MAPEX))

(DEFUN CONSTANT MACRO (X)
       (LIST 'DEFUN (CADR X) 'MACRO '(X) (LIST 'QUOTE (CADDR X))))

(DEFUN LOGAND MACRO (X) (CONS 'BOOLE (CONS '1 (CDR X))))
(DEFUN LOGOR MACRO (X) (CONS 'BOOLE (CONS '7 (CDR X))))
(DEFUN LOGCLR MACRO (X) (CONS 'BOOLE (CONS '4 (CDR X))))

(DEFUN PUSH MACRO (X) (LIST 'SETQ (CADDR X) (LIST 'CONS (CADR X) (CADDR X))))
(DEFUN POP MACRO (X)
       (LIST 'PROG2 NIL
	      (LIST 'CAR (CADR X))
	      (LIST 'SETQ (CADR X) (LIST 'CDR (CADR X)))))

(CONSTANT TOP 4000)		;NAMES OF BITS FOR KNIGHT KEYBOARDS
(CONSTANT SHIFTLOCK 2000)
(CONSTANT SHIFT 1000)
(CONSTANT META 400)
(CONSTANT CTRL 200)
(CONSTANT ASCII-BITS 177)

(CONSTANT ↑K 13)		;VARIOUS ASCII CHARACTERS
(CONSTANT ↑L 14)
(CONSTANT ↑M 15)
(CONSTANT SPACE 40)
(CONSTANT OPEN-PAREN 50)
(CONSTANT VERTICAL-BAR 174)
(CONSTANT PSEUDOSPACE 203)	;A FAKE SPACE (INTERNAL TO LISP)

(CONSTANT SLASH-SYNTAX 2000)	;BITS IN READER SYNTAX TABLE
(CONSTANT ALTERNATE-SYNTAX 40)
(CONSTANT OPEN-SYNTAX 40000)
(CONSTANT CLOSE-SYNTAX 10000)
(CONSTANT RUBOUT-SYNTAX 1000)
(CONSTANT FORCE-FEED 1000)		;WITH ALTERNATE-SYNTAX
(CONSTANT SPACE-SYNTAX 100000)
(CONSTANT SINGLE-SYNTAX 200000)
(CONSTANT MACRO-SYNTAX 4000)
(CONSTANT WORTHY-SYNTAX 277237)		;"WORTHY" CHARACTERS

(CONSTANT SLASH-FLAG 400000)
(CONSTANT STRING-BEGIN-FLAG 200000)
(CONSTANT STRING-END-FLAG 100000)

(DEFUN TYI7 (IFILE)
       ((LAMBDA (CH)
		(COND ((ZEROP (LOGAND (CTRL) CH)) CH)
		      ((= CH (+ (CTRL) 177)) 177)
		      (T (LOGAND CH 37))))
	(LOGCLR (TYI IFILE) (LOGOR (TOP) (SHIFTLOCK) (SHIFT) (META)))))

(DEFUN REPRINT (CHARS COUNT POS OFILE)
       (DECLARE (FIXNUM COUNT))
       (COND (OFILE
	      (AND POS (CURSORPOS (CAR POS) (CDR POS) OFILE))
	      (AND (PLUSP COUNT)
		   (DO ((I 0 (1+ I)))
		       ((= I COUNT) (TYO (SPACE) OFILE))
		       (DECLARE (FIXNUM I))
		       (TYO (OPEN-PAREN) OFILE)))
	      (MAPCAR '(LAMBDA (CH) (TYO (LOGAND CH (ASCII-BITS)) OFILE)) CHARS))))

(DEFUN TTY-PRESCAN (IFILE FN PARENSCOUNT)
       (DECLARE (FIXNUM PARENSCOUNT))
       (PROG (USEFUL STARTPOS OFILE STRING-END BUFFER CH SYNTAX LINMODE TTYREAD COUNT)
	     (DECLARE (FIXNUM STRING-END CH SYNTAX COUNT))
	     (AND (SETQ OFILE (STATUS TTYCONS IFILE))
		  (SETQ STARTPOS (CURSORPOS OFILE)))
	     (SETQ LINMODE (STATUS LINMODE IFILE))
	     (SETQ TTYREAD (STATUS TTYREAD IFILE))
	     (SETQ COUNT PARENSCOUNT)
	     (SETQ STRING-END -1)
	LOOP (SETQ SYNTAX (STATUS SYNTAX (SETQ CH (TYI7 IFILE))))
	     (COND ((= CH (↑M))
		    (COND ((EQ FN 'READLINE) (GO DONE))
			  (LINMODE
			   (OR (MINUSP STRING-END) (PUSH (PSEUDOSPACE) BUFFER))
			   (GO DONE)))))
	     (COND ((OR (= CH (↑K)) (= CH (↑L)))
		    (COND ((NULL OFILE) (GO LOOP))
			  (T (COND ((AND (= CH (↑L)) STARTPOS)
				    (CURSORPOS 'C OFILE))
				   (T (TERPRI OFILE)))
			     (SETQ STARTPOS (CURSORPOS OFILE))
			     (REPRINT (REVERSE BUFFER) PARENSCOUNT NIL OFILE)
			     (GO LOOP))))
		   ((AND (NOT (EQ FN 'READLINE))
			 (PLUSP (LOGAND SYNTAX (SLASH-SYNTAX))))
		    (PUSH CH BUFFER)
		    (PUSH (LOGOR (SLASH-FLAG) (TYI7)) BUFFER)
		    (SETQ USEFUL T)
		    (GO LOOP))
		   ((AND (PLUSP (LOGAND SYNTAX (RUBOUT-SYNTAX)))
			 (ZEROP (LOGAND SYNTAX (ALTERNATE-SYNTAX))))
		    (COND (BUFFER
			   (AND OFILE
				(OR (RUBOUT (LOGCLR (SETQ CH (POP BUFFER))
						    (LOGOR (SLASH-FLAG)
							   (STRING-BEGIN-FLAG)
							   (STRING-END-FLAG)))
					    OFILE)
				    (REPRINT (REVERSE BUFFER) PARENSCOUNT STARTPOS OFILE)))
			   (COND ((PLUSP (LOGAND CH (SLASH-FLAG)))
				  (AND OFILE
				       (OR (RUBOUT (POP BUFFER) OFILE)
					   (REPRINT (REVERSE BUFFER) PARENSCOUNT STARTPOS OFILE))))
				 ((NOT (MINUSP STRING-END))
				  (AND (PLUSP (LOGAND CH (STRING-BEGIN-FLAG)))
					      (SETQ STRING-END -1)))
				 ((PLUSP (LOGAND CH (STRING-END-FLAG)))
				  (SETQ STRING-END (LOGAND CH (ASCII-BITS))))
				 ((PLUSP (LOGAND (SETQ SYNTAX
						       (STATUS SYNTAX
							       (LOGCLR CH
								       (LOGOR (SLASH-FLAG)
									      (STRING-BEGIN-FLAG)
									      (STRING-END-FLAG)))))
						 (OPEN-SYNTAX)))
				  (SETQ COUNT (- COUNT 1)))
				 ((PLUSP (LOGAND SYNTAX (CLOSE-SYNTAX)))
				  (SETQ COUNT (+ COUNT 1)))))
			  (T (AND OFILE (TERPRI OFILE))))
		    (GO LOOP))
		   ((EQ FN 'READLINE)
		    (PUSH CH BUFFER)
		    (GO LOOP))
		   ((NOT (MINUSP STRING-END))
		    (COND ((= CH STRING-END)
			   (PUSH (LOGOR CH (STRING-END-FLAG)) BUFFER)
			   (SETQ STRING-END -1))
			  (T (PUSH CH BUFFER)))
		    (GO LOOP))
		   ((AND (PLUSP (LOGAND SYNTAX (FORCE-FEED)))
			 (PLUSP (LOGAND SYNTAX (ALTERNATE-SYNTAX))))
		    (GO DONE))
		   ((PLUSP (LOGAND SYNTAX (SPACE-SYNTAX)))
		    (COND ((OR (PLUSP COUNT) (NOT USEFUL) LINMODE (NOT TTYREAD))
			   (PUSH CH BUFFER)
			   (GO LOOP))
			  (T (GO DONE))))
		   ((PLUSP (LOGAND SYNTAX (SINGLE-SYNTAX)))
		    (COND ((OR (PLUSP COUNT) LINMODE (NOT TTYREAD))
			   (SETQ USEFUL T)
			   (PUSH CH BUFFER)
			   (GO LOOP))
			  (T (GO DONE))))
		   ((PLUSP (LOGAND SYNTAX (MACRO-SYNTAX)))
		    ((LAMBDA (MAC)
			     (COND ((EQ MAC '+INTERNAL-/;-MACRO)
				    (PUSH (LOGOR CH (STRING-BEGIN-FLAG)) BUFFER)
				    (SETQ STRING-END (↑M)))
				   ((EQ MAC '+INTERNAL-/|-MACRO)
				    (PUSH (LOGOR CH (STRING-BEGIN-FLAG)) BUFFER)
				    (SETQ STRING-END (VERTICAL-BAR)))
				   (T (PUSH CH BUFFER))))
		     (CAR (STATUS MACRO (+ CH 0))))
		    (SETQ USEFUL T)
		    (GO LOOP))
		   ((PLUSP (LOGAND SYNTAX (OPEN-SYNTAX)))
		    (SETQ COUNT (+ COUNT 1))
		    (SETQ USEFUL T)
		    (PUSH CH BUFFER)
		    (GO LOOP))
		   ((PLUSP (LOGAND SYNTAX (CLOSE-SYNTAX)))
		    (COND ((OR (PLUSP COUNT) (NOT USEFUL) LINMODE (NOT TTYREAD))
			   (COND ((PLUSP (SETQ COUNT (- COUNT 1)))
				  (PUSH CH BUFFER)
				  (GO LOOP))
				 (T (GO DONE))))
			  (T (GO DONE))))
		   ((PLUSP (LOGAND SYNTAX (WORTHY-SYNTAX)))
		    (PUSH CH BUFFER)
		    (SETQ USEFUL T)
		    (GO LOOP))
		   (T (PUSH CH BUFFER) (GO LOOP)))
	     DONE (AND OFILE
		       ((LAMBDA (POS)
				(LINENUM OFILE (CAR POS))
				(CHARPOS OFILE (CDR POS)))
			(CURSORPOS OFILE)))
	          (PUSH CH BUFFER)
	          (SETQ BUFFER (NREVERSE BUFFER))
	          (MAP '(LAMBDA (X)
			    (AND (PLUSP (LOGAND (CAR X) (LOGOR (SLASH-FLAG)
							       (STRING-BEGIN-FLAG)
							       (STRING-END-FLAG))))
				 (RPLACA X (LOGCLR (CAR X) (LOGOR (SLASH-FLAG)
								  (STRING-BEGIN-FLAG)
								  (STRING-END-FLAG))))))
		       BUFFER)
	          (RETURN BUFFER)))

AS AN EXAMPLE OF HOW YOU MIGHT CHANGE THIS, HERE IS A SLIGHT
MODIFICATION TO GIVE ONE THE "PARENS BALANCE WINDOW" PROPOSED
BY GREENBLATT:

-------------------------------------------------
TTY PRESCAN FUNCTION WITH PARENS BALANCING WINDOW
-------------------------------------------------
(DECLARE (ARGS 'CURSORPOS '(0 . 3))
	 (SPECIAL IFILE OFILE)
	 (DEFPROP TTYRE A STATUS)
	 (DEFPROP TTYSI A STATUS)
	 (DEFPROP TTYCO A STATUS)
	 (DEFPROP LINMO A STATUS))		;FIX NCOMPL BUGS

(DECLARE (MAPEX T) (NEWIO T))

(DEFUN CONSTANT MACRO (X)
       (LIST 'DEFUN (CADR X) 'MACRO '(X) (LIST 'QUOTE (CADDR X))))

(DEFUN LOGAND MACRO (X) (CONS 'BOOLE (CONS '1 (CDR X))))
(DEFUN LOGOR MACRO (X) (CONS 'BOOLE (CONS '7 (CDR X))))
(DEFUN LOGCLR MACRO (X) (CONS 'BOOLE (CONS '4 (CDR X))))

(DEFUN PUSH MACRO (X) (LIST 'SETQ (CADDR X) (LIST 'CONS (CADR X) (CADDR X))))
(DEFUN POP MACRO (X)
       (LIST 'PROG2 NIL
	      (LIST 'CAR (CADR X))
	      (LIST 'SETQ (CADR X) (LIST 'CDR (CADR X)))))

(CONSTANT TOP 4000)		;NAMES OF BITS FOR KNIGHT KEYBOARDS
(CONSTANT SHIFTLOCK 2000)
(CONSTANT SHIFT 1000)
(CONSTANT META 400)
(CONSTANT CTRL 200)
(CONSTANT ASCII-BITS 177)

(CONSTANT ↑K 13)		;VARIOUS ASCII CHARACTERS
(CONSTANT ↑L 14)
(CONSTANT ↑M 15)
(CONSTANT SPACE 40)
(CONSTANT OPEN-PAREN 50)
(CONSTANT VERTICAL-BAR 174)
(CONSTANT PSEUDOSPACE 203)	;A FAKE SPACE (INTERNAL TO LISP)

(CONSTANT SLASH-SYNTAX 2000)	;BITS IN READER SYNTAX TABLE
(CONSTANT ALTERNATE-SYNTAX 40)
(CONSTANT OPEN-SYNTAX 40000)
(CONSTANT CLOSE-SYNTAX 10000)
(CONSTANT RUBOUT-SYNTAX 1000)
(CONSTANT FORCE-FEED 1000)		;WITH ALTERNATE-SYNTAX
(CONSTANT SPACE-SYNTAX 100000)
(CONSTANT SINGLE-SYNTAX 200000)
(CONSTANT MACRO-SYNTAX 4000)
(CONSTANT WORTHY-SYNTAX 277237)		;"WORTHY" CHARACTERS

(CONSTANT SLASH-FLAG 400000)
(CONSTANT STRING-BEGIN-FLAG 200000)
(CONSTANT STRING-END-FLAG 100000)

(DECLARE (FIXNUM (TYI7 NIL)))

(DEFUN TYI7 (IFILE)
       ((LAMBDA (CH)
		(COND ((ZEROP (LOGAND (CTRL) CH)) CH)
		      ((= CH (+ (CTRL) 177)) 177)
		      (T (LOGAND CH 37))))
	(LOGCLR (TYI IFILE) (LOGOR (TOP) (SHIFTLOCK) (SHIFT) (META)))))

(DEFUN REPRINT (CHARS COUNT POS OFILE)
       (DECLARE (FIXNUM COUNT))
       (COND (OFILE
	      (AND POS (CURSORPOS (CAR POS) (CDR POS) OFILE))
	      (AND (PLUSP COUNT)
		   (DO ((I 0 (1+ I)))
		       ((= I COUNT) (TYO (SPACE) OFILE))
		       (DECLARE (FIXNUM I))
		       (TYO (OPEN-PAREN) OFILE)))
	      (MAPCAR '(LAMBDA (CH) (TYO (LOGAND CH (ASCII-BITS)) OFILE)) CHARS))))

(DEFUN PROMPTER (BUFFER SIZE OFILE)
       (AND OFILE
	    ((LAMBDA (CHARS POS HAUMANY)
		     (CURSORPOS 0 (- (CDR SIZE) HAUMANY 5) OFILE)
		     (CURSORPOS 'L OFILE)
		     (DO ((I 0 (1+ I))
			  (L CHARS (CDR L)))
			 ((OR (NULL L)
			      (= (CAR L) (↑M))
			      (= I HAUMANY)))
			 (DECLARE (FIXNUM I))
			 (TYO (LOGAND (CAR L) (ASCII-BITS))))
		     (CURSORPOS (CAR POS) (CDR POS) OFILE))
	     (DO ((X BUFFER (CDR X))
		  (N 0 ((LAMBDA (SYNTAX)
				(COND (STRING N)
				      ((PLUSP (LOGAND SYNTAX (OPEN-SYNTAX)))
				       (- N 1))
				      ((PLUSP (LOGAND SYNTAX (CLOSE-SYNTAX)))
				       (+ N 1))
				      (T N)))
			(STATUS SYNTAX (LOGAND (CAR X) (ASCII-BITS)))))
		  (STRING NIL (COND ((PLUSP (LOGAND (CAR X) (STRING-BEGIN-FLAG))) NIL)
				    ((PLUSP (LOGAND (CAR X) (STRING-END-FLAG))) T)
				    (T STRING)))
		  (CHARS NIL (CONS (CAR X) CHARS)))
		 ((OR (MINUSP N) (NULL X)) CHARS)
		 (DECLARE (FIXNUM N)))		 
	     (CURSORPOS OFILE)
	     (// (CDR SIZE) 2))))

(DEFUN TTY-PRESCAN (IFILE FN PARENSCOUNT)
       (DECLARE (FIXNUM PARENSCOUNT))
       (PROG (USEFUL STARTPOS OFILE STRING-END BUFFER CH SYNTAX LINMODE TTYREAD COUNT SIZE)
	     (DECLARE (FIXNUM STRING-END CH SYNTAX COUNT))
	     (COND ((SETQ OFILE (STATUS TTYCONS IFILE))
		    (SETQ STARTPOS (CURSORPOS OFILE))
		    (SETQ SIZE (STATUS TTYSIZE OFILE))))
	     (SETQ LINMODE (STATUS LINMODE IFILE))
	     (SETQ TTYREAD (STATUS TTYREAD IFILE))
	     (SETQ COUNT PARENSCOUNT)
	     (SETQ STRING-END -1)
	LOOP (SETQ SYNTAX (STATUS SYNTAX (SETQ CH (TYI7 IFILE))))
	     (COND ((= CH (↑M))
		    (COND ((EQ FN 'READLINE) (GO DONE))
			  (LINMODE
			   (OR (MINUSP STRING-END) (PUSH (PSEUDOSPACE) BUFFER))
			   (GO DONE)))))
	     (COND ((OR (= CH (↑K)) (= CH (↑L)))
		    (COND ((NULL OFILE) (GO LOOP))
			  (T (COND ((AND (= CH (↑L)) STARTPOS)
				    (CURSORPOS 'C OFILE))
				   (T (TERPRI OFILE)))
			     (SETQ STARTPOS (CURSORPOS OFILE))
			     (REPRINT (REVERSE BUFFER) PARENSCOUNT NIL OFILE)
			     (PROMPTER BUFFER SIZE OFILE)
			     (GO LOOP))))
		   ((AND (NOT (EQ FN 'READLINE))
			 (PLUSP (LOGAND SYNTAX (SLASH-SYNTAX))))
		    (PUSH CH BUFFER)
		    (PUSH (LOGOR (SLASH-FLAG) (TYI7 IFILE)) BUFFER)
		    (SETQ USEFUL T)
		    (GO LOOP))
		   ((AND (PLUSP (LOGAND SYNTAX (RUBOUT-SYNTAX)))
			 (ZEROP (LOGAND SYNTAX (ALTERNATE-SYNTAX))))
		    (COND (BUFFER
			   (AND OFILE
				(OR (RUBOUT (LOGCLR (SETQ CH (POP BUFFER))
						    (LOGOR (SLASH-FLAG)
							   (STRING-BEGIN-FLAG)
							   (STRING-END-FLAG)))
					    OFILE)
				    (REPRINT (REVERSE BUFFER) PARENSCOUNT STARTPOS OFILE)))
			   (COND ((PLUSP (LOGAND CH (SLASH-FLAG)))
				  (AND OFILE
				       (OR (RUBOUT (POP BUFFER) OFILE)
					   (REPRINT (REVERSE BUFFER) PARENSCOUNT STARTPOS OFILE))))
				 ((NOT (MINUSP STRING-END))
				  (AND (PLUSP (LOGAND CH (STRING-BEGIN-FLAG)))
					      (SETQ STRING-END -1)))
				 ((PLUSP (LOGAND CH (STRING-END-FLAG)))
				  (SETQ STRING-END (LOGAND CH (ASCII-BITS))))
				 ((PLUSP (LOGAND (SETQ SYNTAX
						       (STATUS SYNTAX
							       (LOGCLR CH
								       (LOGOR (SLASH-FLAG)
									      (STRING-BEGIN-FLAG)
									      (STRING-END-FLAG)))))
						 (OPEN-SYNTAX)))
				  (PROMPTER BUFFER SIZE OFILE)
				  (SETQ COUNT (- COUNT 1)))
				 ((PLUSP (LOGAND SYNTAX (CLOSE-SYNTAX)))
				  (PROMPTER BUFFER SIZE OFILE)
				  (SETQ COUNT (+ COUNT 1)))))
			  (T (AND OFILE (TERPRI OFILE))))
		    (GO LOOP))
		   ((EQ FN 'READLINE)
		    (PUSH CH BUFFER)
		    (GO LOOP))
		   ((NOT (MINUSP STRING-END))
		    (COND ((= CH STRING-END)
			   (PUSH (LOGOR CH (STRING-END-FLAG)) BUFFER)
			   (SETQ STRING-END -1))
			  (T (PUSH CH BUFFER)))
		    (GO LOOP))
		   ((AND (PLUSP (LOGAND SYNTAX (FORCE-FEED)))
			 (PLUSP (LOGAND SYNTAX (ALTERNATE-SYNTAX))))
		    (GO DONE))
		   ((PLUSP (LOGAND SYNTAX (SPACE-SYNTAX)))
		    (COND ((OR (PLUSP COUNT) (NOT USEFUL) LINMODE (NOT TTYREAD))
			   (PUSH CH BUFFER)
			   (PROMPTER BUFFER SIZE OFILE)
			   (GO LOOP))
			  (T (GO DONE))))
		   ((PLUSP (LOGAND SYNTAX (SINGLE-SYNTAX)))
		    (COND ((OR (PLUSP COUNT) LINMODE (NOT TTYREAD))
			   (SETQ USEFUL T)
			   (PUSH CH BUFFER)
			   (GO LOOP))
			  (T (GO DONE))))
		   ((PLUSP (LOGAND SYNTAX (MACRO-SYNTAX)))
		    ((LAMBDA (MAC)
			     (COND ((EQ MAC '+INTERNAL-/;-MACRO)
				    (PUSH (LOGOR CH (STRING-BEGIN-FLAG)) BUFFER)
				    (SETQ STRING-END (↑M)))
				   ((EQ MAC '+INTERNAL-/|-MACRO)
				    (PUSH (LOGOR CH (STRING-BEGIN-FLAG)) BUFFER)
				    (SETQ STRING-END (VERTICAL-BAR)))
				   (T (PUSH CH BUFFER))))
		     (CAR (STATUS MACRO (+ CH 0))))
		    (SETQ USEFUL T)
		    (GO LOOP))
		   ((PLUSP (LOGAND SYNTAX (OPEN-SYNTAX)))
		    (SETQ COUNT (+ COUNT 1))
		    (SETQ USEFUL T)
		    (PUSH CH BUFFER)
		    (PROMPTER BUFFER SIZE OFILE)
		    (GO LOOP))
		   ((PLUSP (LOGAND SYNTAX (CLOSE-SYNTAX)))
		    (COND ((OR (PLUSP COUNT) (NOT USEFUL) LINMODE (NOT TTYREAD))
			   (COND ((PLUSP (SETQ COUNT (- COUNT 1)))
				  (PUSH CH BUFFER)
				  (PROMPTER BUFFER SIZE OFILE)
				  (GO LOOP))
				 (T (GO DONE))))
			  (T (GO DONE))))
		   ((PLUSP (LOGAND SYNTAX (WORTHY-SYNTAX)))
		    (PUSH CH BUFFER)
		    (SETQ USEFUL T)
		    (GO LOOP))
		   (T (PUSH CH BUFFER) (GO LOOP)))
	     DONE (AND OFILE
		       ((LAMBDA (POS)
				(LINENUM OFILE (CAR POS))
				(CHARPOS OFILE (CDR POS)))
			(CURSORPOS OFILE)))
	          (PUSH CH BUFFER)
	          (SETQ BUFFER (NREVERSE BUFFER))
	          (MAP '(LAMBDA (X)
			    (AND (PLUSP (LOGAND (CAR X) (LOGOR (SLASH-FLAG)
							       (STRING-BEGIN-FLAG)
							       (STRING-END-FLAG))))
				 (RPLACA X (LOGCLR (CAR X) (LOGOR (SLASH-FLAG)
								  (STRING-BEGIN-FLAG)
								  (STRING-END-FLAG))))))
		       BUFFER)
	          (PROMPTER NIL SIZE OFILE)
	          (RETURN BUFFER)))

(SSTATUS TTYSCAN 'TTY-PRESCAN)

WEDNESDAY  JUNE 11,1975  NM+2D.17H.37M.36S.   LISP 1076  - GLS -

			TRY NEWIO!

BRIEF SYNOPSIS:
	FOR ALL LISPS:
[1] PRIN1, PRINC, AND PRINT NOW ALWAYS RETURN T
[2] NEW FUNCTION: PROGV DOES DYNAMIC VARIABLE BINDING
[3] NEW FUNCTION: MAPATOMS MAPS OVER ALL ATOMS IN AN OBARRAY
[4] FLATC HAS BEEN SPEEDED UP FOR SYMBOLS
	FOR NEWIO:
[A] EDIT NOW WORKS
[B] NEW FUNCTION: LOAD LOADS UP BOTH EXPR AND FASL FILES
[C] NEW FUNCTION: INCLUDE IS LIKE A MIDAS .INSRT
[D] UREAD'S EOF HANDLER HAS CHANGED
[E] NEW FUNCTION: FILEPOS IS FINALLY IMPLEMENTED
[F] (STATUS FILEMODE) RETURNS FILEPOS INDICATOR IF APPROPRIATE
----------------------------------------------------------------
[1] PRIN1, PRINC, AND PRINT NOW ALL RETURN T INSTEAD OF
    THEIR ARGUMENTS.  THIS IS A BELATED FAST ARITHMETIC MOD.

[2] (PROGV <VAR-LIST> <VALUE-LIST> <FORM1> <FORM2> ... <FORMN>)
    EVALUATES <FORM1> ... <FORMN> AS A PROGN IN AN ENVIRONMENT
    CREATED BY BINDING THE SYMBOLS IN <VAR-LIST> TO THE
    RESPECTIVE VALUES IN <VALUE-LIST>.  THAT IS, THE FIRST
    TWO ARGUMENTS TO PROGV ARE EVALUATED; THE FIRST MUST
    PRODUCE A LIST OF SPECIAL VARIABLES, AND THE SECOND
    A LIST OF VALUES.  THE VARIABLES ARE THEN BOUND TO THE
    VALUES.  IF TOO FEW VALUES ARE SUPPLIED, THE REST OF
    THE VARIABLES ARE BOUND TO NIL.  IF TOO MANY VALUES
    ARE SUPPLIED, THE EXCESS VALUES ARE IGNORED.
    THE BODY OF THE PROGV IS THEN EVALUATED AS A PROGN,
    THE VARIABLES UNBOUND TO THEIR OLD VALUES, AND THE
    VALUE OF THE LAST FORM IS RETURNED.
    EXAMPLE:
	(SETQ A 'FOO)
	(SETQ B 'BAR)
	(PROGV (LIST A B 'B) (LIST B) (LIST A B FOO BAR))
		==> (FOO NIL BAR NIL)

[3] (MAPATOMS <FN>) MAPS THE FUNCTION <FN> OF ONE ARGUMENT
    OVER ALL SYMBOLS IN THE CURRENT OBARRAY, AND THEN
    RETURNS NIL.  EXAMPLE:
	(MAPATOMS (FUNCTION (LAMBDA (X)
				    (AND (= (FLATC X) 11.)
					 (PRINT X)))))
    WOULD PRINT:
	NOINTERRUPT
	GC-OVERFLOW
    AND RETURN NIL.
    A SECOND ARGUMENT MAY BE SUPPLIED, WHICH MUST BE AN
    OBARRAY (*NOT* AN ATOM WITH AN OBARRAY AS AN ARRAY
    PROPERTY!!!).  THE FUNCTION IS THEN MAPPED OVER THE
    SPECIFIED OBARRAY.

[4] FLATC HAS SPECIAL SPEED-OF-LIGHT CODE FOR SYMBOLS,
    IN CASE ANYONE WANTS TO KNOW...
----------------------------------------------------------------
[A] THE EDIT PACKAGE NOW WORKS CORRECTLY IN NEWIO.

[B] THE LOAD FUNCTION TAKES A NEWIO FILE NAME AS ITS ARGUMENT,
    AND ATTEMPTS TO LOAD IT UP.  IF NO SECOND FILE NAME IS
    GIVEN, IT FIRST TRIES USING "FASL", AND THEN ">".
    AFTER FINDING THE FILE, IT DETERMINES WHETHER IT IS A FASL
    FILE OR NOT (BY LOOKING AT THE FIRST WORD).  IF A FASL FILE,
    IT CALLS FASLOAD TO LOAD THE FILE.  OTHERWISE, IT OPENS
    THE FILE AS AN ASCII FILE, PUSHES IT ON THE INSTACK,
    AND PERFORMS A READ-EVAL LOOP UNTIL END OF FILE.
    BECAUSE OF THIS MODE OF OPERATION, INCLUDE'S (SEE [C])
    WILL WORK IN LOADED FILES.
    THE IDEA IS THAT YOU SAY (LOAD 'FOO) AND IT LOADS FOO.

[C] INCLUDE IS A FEXPR WHICH TAKES A FILE NAME.
	(DEFUN INCLUDE FEXPR (X) (INPUSH (OPEN (CAR X))))
    THAT IS, ONE TYPICALLY WOULD WRITE:
	(INCLUDE |DSK:GLS;FOO >|)
    OR WHATEVER.
    IF THIS IS EVALUATED IN THE COURSE OF UREAD'ING OR
    LOAD'ING A FILE, THE EFFECT IS TO INCLUDE THE TEXT OF
    THE INSERTED FILE IN PLACE OF THE INCLUDE.  (OF COURSE,
    USER-SUPPLIED EOF HANDLERS MAY ALTER THIS SOMEWHAT.)
    EVENTUALLY THE @ PROGRAM WILL UNDERSTAND INCLUDE'S.

[D] UREAD'S EOF HANDLER WAS FORMERLY DEFINED TO BE:
	(LAMBDA (FILE EOFVAL) (SETQ UREAD NIL))
    IT IS NOW DEFINED TO BE:
	(LAMBDA (FILE EOFVAL) (SETQ UREAD NIL) EOFVAL)
    SO THAT READ OF ONE ARGUMENT WILL WORK CORRECTLY
    ON A UREAD FILE.

[E] FILEPOS IS NOW IMPLEMENTED, EXCEPT THAT IT DOES NOT
    WORK YET TO TRY TO SET THE FILEPOS ON AN OUTPUT FILE.
    (ONE MAY READ THE CURRENT FILEPOS WHILE WRITING,
    HOWEVER.)  FILEPOS MEASURES POSITION IN TERMS OF
    CHARACTERS FOR ASCII FILES, AND FIXNUMS (WORDS)
    FOR FIXNUM FILES.

[F] (STATUS FILEMODE FOO) WILL RETURN THE FLAG "FILEPOS"
    IN THE CDR OF ITS RESULT IFF THE FILE FOO WILL WORK
    FOR BOTH READING AND SETTING THE FILEPOS.

TUESDAY  MAY 27,1975   FM+2D.18H.3M.18S.   NEWIO 1061   - GLS -

Note that ONEWIO↑K or OQ↑K gets an old version of NEWIO (Q).

Brief synopsis:
[1] MSGFILES controls output of "messages" from LISP.
[2] File arrays as arguments to SYSCALL supply channel number.
[3] ERRPRINT may take a second arg (output files).
[4] (CLOSE foo) does (SSTATUS TTYCONS foo NIL) if foo is a tty.
[5] OPEN tends to reset file array attributes.
[6] A sample program to do rubout processing.
[7] A sample program to use 12-bit chars on Knight keyboards.
[8] A sample program to use the echo area.
[9] A sample program to hack the line printer.
[10] A sample program to create "dribble files" using ECHOFILES.
----------------------------------------------------------------
[1] The variable MSGFILES is like the variable OUTFILES,
    except that "messages" like GC messages, error messages,
    ";BKPT barf", etc. are output to MSGFILES files and not
    to OUTFILES files.  (Recall that OUTFILES is the list of
    default user output files, controlled by ↑R.  There is no
    switch equivalent to ↑R for MSGFILES.)  Initially the value
    of MSGFILES is (T), i.e. messages go only to the tty.

[2] If a file array is given as an input argument to SYSCALL
    in newio, the system actually gives the .CALL the channel
    number of the file array.  If T is given, the channel number
    of the input tty file T is supplied.  Thus:
	(SYSCALL 0 'SCML T 7)
    sets the number of command lines (size of echo area) to 7
    for the standard input tty.
    By the way, if you ever use SYSCALL for something you think
    LISP might want to provide as a separate function (for ease of
    use, compatibility with other systems, etc.) please send
    mail to GLS describing the usage.

[3] The ERRPRINT function now takes an optional second argument
    like PRINT to specify the output files to print the message
    on.  Thus, for example,
	(ERRPRINT NIL MSGFILES)
    prints the most recent error message onto the message files.

[4] Closing a tty file will undo any (SSTATUS TTYCONS) pair
    that that file may be engaged in.  Since OPEN uses CLOSE
    if given an actual file as first argument, note that it
    may be necessary to re-TTYCONS two tty files after
    re-opening one or both of them.

[5] In general, re-opening a file (especially a tty) resets
    the file array for that tty.  LISP makes an effort to
    save some important attributes about the input and output
    T files (standard tty) when starting up and re-opening the
    T tty files, but this is not a general attribute of the OPEN
    function.  Thus, after re-opening a file array, the attributes
    of that file array (such as (SSTATUS TTYCONS), (SSTATUS TTY),
    (SSTATUS TTYINT), (EOFFN) or (ENDPAGEFN), etc.) should be
    set up all over again.

[6] Sometimes a user may want to do his own rubout processing
    without having to hack the ultimately hairy (SSTATUS TTYSCAN)
    feature.  Here is a function showing the correct way to
    do rubout processing for simple applications.

;;; This function takes two arguments.
;;;	The first is the character (a fixnum) which terminates input.
;;;	The second is the file to read from (T for tty input).
;;;		It works to use this function on a non-tty.
;;; The result returned is a list of fixnums representing the
;;; characters read and not rubbed out.  The termination character
;;; is not included in this list, but thrown away.
;;; Over-rubout does not do anything at all.
;;; Example:	(SNARF-CHARS-UNTIL 3 t)
;;;	reads characters from T (the tty) until a ↑C (ascii code 3)
;;;	is typed.  If the user types "FOOBER<rubout><rubout>AR↑C",
;;;	then the result will be (106 117 117 102 101 122).
;;;
;;; Note the use of the newio function RUBOUT to rub characters out.
;;; If RUBOUT returns NIL, then it could not rub the character out
;;; (e.g. it was tab or cr); it is necessary then to re-print the
;;; list of buffered characters.
;;;	TTYP is non-NIL iff the input file is a tty.
;;;	ECHO-FILE is the associated output file of the input tty,
;;;		or NIL if the input file has none or isn't a tty.
;;;	START-POS is the original cursor position in ECHO-FILE, or NIL.
;;;	BUFFER is a list of characters read in reverse order.

(DEFUN SNARF-CHARS-UNTIL (ENDCHAR INPUT-FILE)
       ((LAMBDA (TTYP)
		((LAMBDA (ECHO-FILE)
			 (DO ((START-POS (AND ECHO-FILE (CURSORPOS ECHO-FILE)))
			      (BUFFER)
			      (CHAR (TYI INPUT-FILE) (TYI INPUT-FILE)))
			     ((= CHAR ENDCHAR) (NREVERSE BUFFER))
			     (COND ((= CHAR 177)
				    (AND BUFFER
					 ECHO-FILE
					 (OR (RUBOUT (CAR BUFFER) ECHO-FILE)
					     (PROGN (CURSORPOS (CAR START-POS)
							       (CDR START-POS)
							       ECHO-FILE)
						    (CURSORPOS 'E ECHO-FILE)
						    (MAPC (FUNCTION (LAMBDA (CH)
								(TYO CH ECHO-FILE)))
							  (REVERSE (CDR BUFFER))))))
				    (AND BUFFER (SETQ BUFFER (CDR BUFFER))))
				   (T (SETQ BUFFER (CONS CHAR BUFFER))))))
		 (AND TTYP (STATUS TTYCONS INPUT-FILE))))
	(MEMQ 'TTY (CAR (STATUS FILEMODE INPUT-FILE)))))

[7] This function shows the correct way to re-open the tty
    in 12-bit mode on a Knight keyboard.  Note that the LISP
    system normally folds 12-bit characters down to 7 bits
    always, except for the TYI function.  Thus the READTABLE
    still only has 200 entries, etc.

;;; Open the tty in 12-bit mode.  After (12-BIT-OPEN) is done,
;;; (TYI) from the tty will return 12-bit characters.  The characters
;;; are as supplied by ITS:
;;;	bit	value	ITS name     correspondence
;;;	2.3	4000	%TXTOP		TOP
;;;	2.2	2000	%TXSFL		SHIFT LOCK
;;;	2.1	1000	%TXSFT		SHIFT
;;;	1.9	 400	%TXMTA		META
;;;	1.8	 200	%TXCTL		CONTROL
;;;	1.7-1.1	 177	%TXASC		ascii code
;;; After re-opening the input tty in 12-bit mode, it is necessary
;;; to restore the attributes of the file array.
;;; In this mode, the LISP system control characters are set up
;;; to ignore control characters which do not actually have the
;;; CONTROL bit set.  Thus typing TOP-X to get "beta" will not
;;; invoke the system ↑C interrupt.  User interrupt character
;;; functions must decide for themselves whether to do such
;;; filtering (they receive the full 12-bit character as an
;;; argument, and so may do this if desired).

(DEFUN 12-BIT-OPEN NIL
       ((LAMBDA (SCAN-FUNCTION)
		(OPEN T '(TTY IN SINGLE FIXNUM))	;OPEN IN 12-BIT MODE
		(SSTATUS TTYCONS T T)			;TIE TO OUTPUT TTY
		(SSTATUS TTYSCAN SCAN-FUNCTION)		;SET UP RUBOUT HANDLER
		(MAPC (FUNCTION (LAMBDA (CH INT)	;SET UP STANDARD
			 (SSTATUS TTYINT		; CONTROL CHARACTERS,
				  CH			; REQUIRING "CONTROL"
				  (+ INT 200))))	; KEY FOR ANY EFFECT
		      '(3 4 7 22 23 24 26 27 30 32)
		      '(3 4 7 22 30 24 26 27 30 32)))
	(STATUS TTYSCAN)))		;OLD RUBOUT HANDLER

[8] Here is a function which opens up and manipulates tty files
    such that input is typed in the echo area and output appears
    above.  Rubout processing happens correctly in the echo area.
    Note that it uses TTY-ENDPAGEFN, the **MORE** processor
    defined in the previous LISP RECENT.

(DEFUN SPLITSCREEN (ECHOAREASIZE)
       ((LAMBDA (ECHOTTY VERTICAL)
		(SSTATUS TTYCONS T ECHOTTY)		;cons echo area tty to input tty
		(PAGEL T (- VERTICAL ECHOAREASIZE))	;set pagel for main area tty
		(ENDPAGEFN T 'TTY-ENDPAGEFN)		;set endpagefn
		(SYSCALL 0 'SCML T ECHOAREASIZE)	;set size of echo area
		(CURSORPOS 'C T)			;clear screen (why not?)
		'DONE)
	(OPEN '((TTY)) '(TTY OUT ECHO))		;file array for echo area tty output
	(CAR (STATUS TTYSIZE T))))

    Here is a version which causes ALL input and output to happen
    in the echo area, leaving the main program area free for graphics
    or whatever else.

(DEFUN SMALLSCREEN (ECHOAREASIZE)
       (OPEN T '(TTY OUT ECHO))
       (SSTATUS TTYCONS T T)
       (SYSCALL 0 'SCML T ECHOAREASIZE)
       'DONE)

[9] Here are some routines which simulate the old ↑B-↑E feature
    of oldio.  Since ↑B is a break in newio, ↑A and ↑E are used.
    The functions WALBEG and WALEND are as in DDT, and are used
    to open and close the wallpaper file.  If ↑A discovers that
    WALBEG has not been called, the TPL device is used.

;;; WALLPAPER ROUTINES
;;;	VALUE OF WALLPAPERFILE, IF NON-NIL, IS FILE ARRAY FOR
;;;		WALLPAPER.
;;;	↑A-HANDLER IS INVOKED BY TYPING ↑A.  TURNS ON OUTPUT
;;;		TO WALLPAPER FILE.
;;;	↑E-HANDLER IS INVOKED BY ↑E.  TURNS OFF WALLPAPER OUTPUT.
;;;	WALBEG INITIALIZES SETUP TO SPECIFIED FILE.
;;;	WALEND TERMINATES THE CURRENT WALLPAPER FILE,
;;;		AND NAMES IT IF DESIRED (DEFAULT IS "WPAPER >").

(DECLARE (SPECIAL WALLPAPERFILE OLD↑R))

(SETQ WALLPAPERFILE NIL)

(DEFUN ↑A-HANDLER (F CH)
       (OR WALLPAPERFILE (WALBEG TPL))
       (OR ↑A (SETQ OLD↑R ↑R))
       (SETQ ↑A T)
       (SETQ ↑R T)
       (OR (MEMQ WALLPAPERFILE OUTFILES)
	   (SETQ OUTFILES (CONS WALLPAPERFILE OUTFILES))))

(DEFUN ↑E-HANDLER (F CH)
       (SETQ ↑R OLD↑R)
       (SETQ ↑A NIL)
       (SETQ OUTFILES (DELQ WALLPAPERFILE OUTFILES)))

(DEFUN WALBEG FEXPR (DEVDIR)
       (WALEND)
       (SETQ WALLPAPERFILE
	     (OPEN (LIST (OR DEVDIR (CAR (DEFAULTF NIL)))
			 '←WALL←
			 'PAPER)
		   'OUT))
       T)

(DEFUN WALEND FEXPR (NAME)
       (COND (WALLPAPERFILE
	      (↑E-HANDLER NIL NIL)
	      (AND NAME (RENAME WALLPAPERFILE NAME))
	      (CLOSE WALLPAPERFILE)
	      (SETQ WALLPAPERFILE NIL))))

(SSTATUS TTYINT 1 '↑A-HANDLER)
(SSTATUS TTYINT 5 '↑E-HANDLER)

[10] Here are some functions to create "dribble files",
    i.e. files contains both input and output.

;;; (DRIBBLE) opens a dribble output file.
;;; DRIBBLE, if non-nil, is the dribble output file array.
;;; (WIPE FOO BAR) wipes up the current dribble, closing
;;;	the file and naming it FOO BAR.

(DECLARE (SPECIAL DRIBBLE))

(DEFUN DRIBBLE NIL
       (WIPE /.DRIB/. OUTPUT)
       (SETQ DRIBBLE (OPEN '|.DRIB. OUTPUT| 'OUT)))
       (SETQ OUTFILES (CONS DRIBBLE OUTFILES))
       (SETQ ECHOFILES (CONS DRIBBLE ECHOFILES))
       (SETQ MSGFILES (CONS DRIBBLE MSGFILES))
       (SETQ ↑R T))

(DEFUN WIPE FEXPR (NAME)
       (COND (DRIBBLE
	      (OR (SETQ OUTFILES (DELQ DRIBBLE OUTFILES))
		  (SETQ ↑R NIL))
	      (SETQ ECHOFILES (DELQ DRIBBLE ECHOFILES))
	      (SETQ MSGFILES (DELQ DRIBBLE MSGFILES))
	      (CLOSE (RENAME (PROG2 NIL DRIBBLE
				    (SETQ DRIBBLE NIL))
			     NAME)))))

FRIDAY  APRIL 18,1975   FQ+9H.34M.47S.   LISP 1049   - GLS -

A NEW VERSION OF NEWIO IS UP!  TRY IT, AND REPORT ANY
LOSSES TO GLS, OR SAY :BUG NEWIO ... ↑C TO DDT.

BRIEF SYNOPSIS:
[0] INCOMPATIBLE CHANGE!!!  PRINT, PRIN1, AND PRINC TO GIVE OUT T
[1] COMPILER RESETS GENSYM COUNTER
[2] DEFUN MAY REMOVE THE EXPR-HASH PROPERTY
[3] VERTICAL BAR AND EXCLAMATION POINT AS SYMBOL QUOTERS
[4] NEW PECULIAR FUNCTION: SYSCALL
[5] COMPILER ALLOWS DECLARES IN DO LOOPS
[6] TECHNIQUE: AVOIDING NUMBER CONSING
[7] EVALHOOK
[8] NEW VERSION OF NEWIO OUT
	[A] TYIPEEK NOW IMPLEMENTED
	[B] ↑Q TO ALLOC AND JCL WORK
	[C] (STATUS FILEMODE)
	[D] (STATUS TTYINT)
	[E] (STATUS TTYCONS)
	[F] (STATUS TTYSCAN)
	[G] RUBOUT
	[H] NEW INTERRUPT SYSTEM
	[I] VALUE OF AUTOLOAD IS THE AUTOLOAD FUNCTION
	[J] **MORE** INTERRUPTS
	[K] FASLOAD WITHIN FASLOAD
	[L] ↑X FUNCTION FLUSHED - ↑G REMAINS
	[M] FORCE IS FORCE-OUTPUT AGAIN
	[N] CLEAR-INPUT AND CLEAR-OUTPUT
----------------------------------------------------------------
[0] A GHOST OF THE PAST LOOMS UP.  WHEN NCOMPLR WAS CREATED, WE MADE 
    SOME DECISIONS THAT, FOR EFFICIENCY REASONS, REQUIRED TYO, PRINT,
    PRIN1, AND PRINC TO RETURN SOME PROVABLY NON-NUMERIC VALUE.  
    GENERALLY, THIS MEANS SOME CONSTANT LIKE T OR NIL.  TYO WAS 
    CHANGED LONG AGO, BUT WE HAVE BEEN WAITING UNTIL THE LAST POSSIBLE
    MINUTE TO MAKE THE REQUISITE CHANGE TO THE PRINT SERIES.  THE TIME
    HAS COME (AND WE HEAR VOICES OF WALRUSES);  OUR SYMPATHIES GO OUT 
    TO THOSE, WHO LIKE US, WILL HAVE TO EXPLORE THEIR CODE TO 
    ACCOMODATE THIS INCOMPATIBLE CHANGE.  HOWEVER, THIS CHANGE WILL 
    NOT ACTUALLY TAKE EFFECT UNTIL AFTER MAY 19, 1975.  IF THE ONLY 
    USE YOUR EVER MADE OF THE VALUE OR PRINT WAS TO CONTINUE AN "AND",
    YOU NEED NOT WORRY.  E.G. 
	(AND (PRED X) (PRINC 'HERE/ WE/ ARE/ ) (PRINT X) (PRINT Y))
    WILL STILL WORK ESSENTIALLY THE SAME.
	BE WARNED ALSO!  THE OLD COMPLR IS ESSENTIALLY DEAD; THERE 
    WILL BE A FUNERAL FOR IT SOON.  NCOMPLR IS NOW QUITE A BIT MORE 
    BUG-FREE THAN THE OLD COMPLR, AND AFTER COMPLR'S DEMISE, 
    SYS:TS COMPLR  WILL LINK TO SYS:TS NCOMPLR.

[1] NOTE THAT THE COMPILER USES THE GENSYM FUNCTION FOR
    GENERATING LAP TAGS, AND RESETS THE GENSYM COUNTER AT
    THE BEGINNING OF EACH FUNCTION.  THEREFORE GENSYM IS NOT
    A RELIABLE WAY TO GENERATE UNIQUE ATOMS FOR USE BY MACROS
    IF YOU PLAN TO INTERN THEM (UNINTERNED, THE NAME DOESN'T
    MATTER, OF COURSE).  SORRY ABOUT THAT.

[2] DEFUN WILL REMOVE THE EXPR-HASH PROPERTY FROM AN ATOM
    IF IN EXPR-HASH MODE (DEFUN = T) AND IT INSTALLS A NEW
    PROPERTY.  THIS IS TO PREVENT LOSSES SUCH AS RE-INSTALLING
    THE OLD DEFINITION NOT WORKING.

[3] VERTICAL BAR (ASCII CODE 174) NOW INITIALLY HAS A READ-MACRO
    PROPERTY WHICH CAUSES IT TO GOBBLE UP CHARACTERS UNTIL
    THE NEXT VERTICAL BAR, AND MAKE AN INTERNED ATOMIC SYMBOL
    OUT OF IT.  IT IS THUS ANOTHER WAY TO QUOTE CHARACTERS
    IN ATOMIC SYMBOLS.  TO GET A VERTICAL BAR OR CARRIAGE RETURN
    OR SLASH INTO SUCH A CONSTRUCT, USE SLASH.  EXAMPLE:
	|A /| WILL GOBBLE CHARS UNTIL
THE NEXT /| NOT PRECEDED BY //|
    IS THE ATOMIC SYMBOL WITH THE PRINT NAME:
	"A | WILL GOBBLE CHARS UNTIL THE NEXT | NOT PRECEDED BY /"
    THE CARRIAGE RETURN ISN(T PART OF THE PRINT NAME BECAUSE IT
    HAD NO / IN FRONT OF IT.  THIS IS SO AN AUTOMATIC TERPRI
    FORCED BY THE LINEL WON'T SCREW THINGS UP.
    AS A CONCESSION TO DATAPOINT LOSERS, EXCLAMATION POINT
    PRESENTLY HAS A SIMLAR PROPERTY.  HOWEVER, LOSERS ARE
    ADVISED NOT TO PUT ! IN THEIR FILES, AS VERTICAL BAR IS
    THE "OFFICIAL" ONE.  USERS OF CONNIVER ON DATAPOINTS
    HAVE A PROBLEM -- TOUGH NOOGIES.
    EVENTUALLY PRIN1 WILL HAVE SOME SMARTS ABOUT OUTPUTTING
    VERTICAL BARS.  IN NEWIO, THE RUBOUT PROCESSOR IS CLEVER
    ABOUT VERTICAL BARS, BUT NOT IN OLDIO -- BEWARE.

[4] THE FUNCTION SYSCALL TAKES FROM TWO TO TEN ARGUMENTS.
    THEY ARE:
	(1)	N, THE NUMBER OF OUTPUT RESULTS DESIRED (A FIXNUM 
		FROM 0 TO 8); THE RETURN VALUE OF SYSCALL WILL THUS 
		BE A LIST OF N FIXNUMS.  OPTIONALLY, THE "CONTROL" 
		BITS "C" MAY BE SPECIFIED BY GIVING AS FIRST ARG 
			N + LSH[C;18.]
	(2)	NAME OF SYSTEM CALL (ATOMIC SYMBOL).
	(3-10)	INPUT ARGUMENTS (FIXNUMS).
    THE SPECIFIED ITS SYSTEM CALL IS PERFORMED AND A LIST
    OF THE RESULTS ARE RETURNED AS FIXNUMS.  IF AN ERROR
    OCCURS, A FIXNUM (THE ERROR CODE) IS RETURNED INSTEAD
    OF THE LIST OF RESULTS.
    NO COMPENSATION IS MADE FOR SYSTEM CALLS THAT TAKE
    CHANNEL NUMEBSR, AOBJN POINTERS, CLOBBER THEIR
    INPUT ARGS, ETC.  BEWARE!
    EXAMPLE:
	(SYSCALL 6 'CNSGET 2)
    WILL RETURN A LIST OF SIX FIXNUMS DESCRIBING THE
    TTY (OLDIO OPENS THE TTY ON CHANNEL 2 -- NEWIO
    USERS, BEWARE!!!).

[5] THE COMPILER NOW ALLOWS LOCAL DECLARATIONS TO BE PUT IN DO
    LOOPS IN THE SAME WAY THEY MAY BE IN LAMBDAS AND PROGS.
    EXAMPLE, TO FIND THE INDEX OF THE FIRST "FOO" IN THE LIST X:
	(DO ((N 0 (1+ N))  (L X (CDR L)))
	    ((NULL L) -1)
	  (DECLARE (FIXNUM N))
	  (AND (EQ (CAR L) 'FOO) (RETURN N)))

[6] PROGRAMMING TECHNIQUE:
    YOU MAY FIND YOUR FUNCTIONS DOING AN INORDINATE AMOUNT
    OF NUMBER CONSING EVEN AFTER USING NCOMPLR.  IF SO,
    CONSIDER WHETHER ANY OF YOUR FUNCTIONS, WHICH ARE NOT DECLARED 
    TO BE FIXNUM OR FLONUM FUNCTIONS ARE NEEDLESSLY RETURNING 
    NUMERICAL RESULTS. E.G.,
	(DEFUN BAR (X Y N M) 
	    (COND ((MUMBLE X Y) 
		   (PRINC '/ANSWERS/ ARE:)
		   (PRIN1 N) (PRINC '/ ) (PRIN1 M) (TERPRI)))
	    N)				;RANDOM RETURN VALUE
    IF BAR IS INDEED USED PRIMARILY FOR EFFECT, THERE IS NO REASON 
    TO RETURN A NUMERICAL VALUE, WHICH WILL USUALLY CAUSE NCOMPLR 
    TO OUTPUT A NUMBER-CONS CALL.  SOMETIMES, RETURNING A NUMERICAL 
    RESULT MAY BE PARTIALLY HIDDEN FROM YOUR EYE, AS IN THE CASE OF 
    FEEDING AN ARG TO A FUNCTION SUCH AS STORE, WHICH RETURNS ONE OF 
    ITS INPUT ARGS AS RESULTANT VALUE  E.G.,
	(DEFUN FOO (J N) (STORE (MY-FIXNUM-ARRAY N) J))
    THIS WILL STORE THE FIXNUM J INTO SLOT N, AND IT WILL ALSO
    RETURN J.  UNLESS YOU REALLY NEED FOO TO RETURN J, YOU SHOULD 
    WRITE
	(DEFUN FOO (J N) (STORE (MY-FIXNUM-ARRAY N) J) NIL)
    AND LET NIL BE RETURNED.  THIS APPLIES TO ANY FUNCTION
    WHOSE LAST ACTION WILL PRODUCE A NUMERICAL VALUE, AND WHOSE
    PURPOSE IS PRIMARILY TO PERFORM SOME SIDE-EFFECT.

[7] AT LONG LAST, HERE IS SOME (MINIMAL) DOCUMENTATION
    ON THE INFAMOUS EVALHOOK FEATURE!
    THE EVALHOOK FEATURE WAS INVENTED SO THAT A DYNAMIC
    SINGLE-STEP TRACER COULD BE WRITTEN.  USING THE
    EVALHOOK FEATURE IS A BLACK ART, SO READ ON, BUT
    CAREFULLY.
    THERE EXIST BOTH A FUNCTION AND A VARIABLE CALLED
    "EVALHOOK".  THERE IS ALSO A (SSTATUS EVALHOOK).
    ((STATUS EVALHOOK) EXISTS BUT DOES NOT RETURN ANYTHING
    MEANINGFUL AT ALL.)
    THE SEMANTICS OF THE VARIABLE EVALHOOK ARE AS FOLLOWS:
    WHENEVER THE FUNCTION EVAL IS ENTERED, WHETHER FROM
    WITHIN THE SYSTEM OR BY EXPLICIT INVOCATION BY THE USER,
    THEN IF THE VALUE OF THE VARIABLE EVALHOOK IS NON-NIL,
    AND *RSET IS NON-NIL, AND (SSTATUS EVALHOOK T) HAS BEEN
    DONE, THEN EVAL DOES NOT EVALUATE ITS ARGUMENT.
    INSTEAD IT ASSUMES THAT THE VALUE OF THE VARIABLE
    EVALHOOK IS A FUNCTION OF ONE ARGUMENT.  IT FETCHES
    THIS FUNCTION, LAMBDA-BINDS EVALHOOK TO NIL, AND
    CALLS THE FUNCTION WITH THE ARGUMENT TO EVAL.
    THIS FUNCTION THEN HAS THE RESPONSIBILITY FOR EVALUATING
    THE FORM AND RETURNING A RESULT.  THIS RESULT BECOMES
    THE RESULT OF THE ORIGINAL CALL TO EVAL.
    IT IS EVIDENT THAT SUCH A FUNCTION CAN DO OTHER THINGS
    BESIDES EVALUATE THE FORM; E.G. IT CAN PRINT TRACE
    INFORMATION.
    THE REASON THAT EVALHOOK IS BOUND BACK TO NIL BEFORE
    CALLING THE HOOK FUNCTION IS BECAUSE THE HOOK FUNCTION
    MAY BE INTERPRETED, AND WE WANT TO AVOID INFINITE
    RECURSION.  THERE IS A PROBLEM, THOUGH:  HOW CAN THE
    HOOK FUNCTION EVALUATE ITS ARGUMENT ONCE IT HAS
    PRINTED STUFF OUT?  IF IT JUST CALLS EVAL BACK AGAIN,
    THEN THE VARIABLE EVALHOOK WILL BE NIL, AND THE
    HOOK FUNCTION WILL NOT GET CALLED FOR THE RECURSIVE
    CALLS ON EVAL.  IF IT SETQ'S EVALHOOK TO THE HOOK
    FUNCTION AND THEN CALLS EVAL, THE HOOK FUNCTION WILL
    GET CALLED BACK WITH THE SAME THING.
    FOR THIS REASON THERE IS AN EVALHOOK FUNCTION.
    THE EVALHOOK FUNCTION CALLS EVAL WITH ITS FIRST
    ARGUMENT, AFTER BINDING THE VARIABLE EVALHOOK TO
    ITS LAST ARGUMENT, AND BYPASSING THE HOOK FUNCTION
    CHECK IN EVAL.
    IF THAT ALL WENT BY TOO FAST, TAKE A LOOK AT THESE
    DEFINITIONS IN LISP:

	(DECLARE (SPECIAL *RSET EVALHOOK))

	(DEFUN EVAL N
	       (OR (= N 1) (= N 2)
		   (ERROR '|WRONG NUMBER OF ARGS TO LSUBR|
			  (CONS 'EVAL (LISTIFY N))
			  'WRNG-NO-ARGS))
	       (AND (= N 2)
		    (HACK-FAKE-ALIST (ARG 2)))
	       (COND ((AND EVALHOOK
			   *RSET
			   (SSTATUS-EVALHOOK-T-WAS-DONE-P))
		      ((LAMBDA (EVALHOOK)
			       (FUNCALL EVALHOOK (ARG 1)))
		       NIL))
		     (T (+INTERNAL-EVAL (ARG 1)))))

	(DEFUN EVALHOOK N
	       (OR (= N 2) (= N 3)
		   (ERROR '|WRONG NUMBER OF ARGS TO LSUBR|
			  (CONS 'EVALHOOK (LISTIFY N))
			  'WRNG-NO-ARGS))
	       (AND (= N 3)		;SECOND ARG OF 3 IS ALIST
		    (HACK-FAKE-ALIST (ARG 2)))
	       ((LAMBDA (EVALHOOK)
			(+INTERNAL-EVAL (ARG 1)))
		(ARG N)))

    THE REASON THAT BOTH (*RSET T) AND (SSTATUS EVALHOOK T)
    MUST BE DONE IS FOR REASONS OF EFFICIENCY (SIGH).

    HERE IS AN EXAMPLE OF THE USAGE OF EVALHOOK:

(DEFUN HOOK FEXPR (X)			;CALLED AS (HOOK <FORM>)
       ((LAMBDA (*RSET EVALHOOK)
		(PROG2 (SSTATUS EVALHOOK T)	;MAGIC SSTATUS
		       (EVAL (CAR X))		;EVALUATE FORM
		       (SSTATUS EVALHOOK NIL)))	;MORE MAGIC
	T
	'HOOK-FUNCTION))		;THE HOOK FUNCTION

(DEFUN HOOK-FUNCTION (F)
       (TERPRI)			;PRINT PRETTY MESSAGE FOR INPUT
       (PRINC '|FORM: |)
       (PRIN1 F)
       ((LAMBDA (V)		;V GETS VALUE OF FORM
		(TERPRI)	;PRETTY OUTPUT MESSAGE
		(PRINC '|VALUE: |)
		(PRIN1 V))
	(EVALHOOK F 'HOOK-FUNCTION)))	;THIS IS HOW TO EVAL THE FORM
					; SO AS TO HOOK SUB-FORMS

    THUS FOR SOMETHING LIKE (HOOK (CONS (CAR '(A . B)) 'C))
    THE FOLLOWING OUTPUT MIGHT BE SEEN:

	FORM: (CONS (CAR (QUOTE (A . B))) (QUOTE C))
	FORM: (CAR (QUOTE (A . B)))
	FORM: (QUOTE (A . B))
	VALUE: (A . B)
	FORM: (QUOTE C)
	VALUE: C
	VALUE: ((A . B) . C)
	((A . B) . C)

    NATURALLY, ONE CAN DREAM UP INFINITELY HAIRY THINGS
    TO DO WITH THIS, SUCH AS INTERACTIVE TRACING AND BREAKING,
    INDENTED OUTPUT, ETC.


[8] A NEW VERSION OF NEWIO IS OUT!
    HERE FOLLOWS A COPY OF .INFO.;NEWIO STUFF, WHICH HAS
    BEEN UPDATED TO ACCOUNT FOR ALL THE CHANGES MENTIONED
    IN THE SYNOPSIS.

NEWIO NEWIO NEWIO NEWIO NEWIO NEWIO NEWIO NEWIO NEWIO NEWIO
----------------------------------------------------------------
THINGS OF NOTE NOT YET IMPLEMENTED:
----------------------------------------------------------------
[1]	FILEPOS NOT YET IMPLEMENTED.
[2]	ALLFILES NOT YET IMPLEMENTED.
[3]	MOBY I/O DOES NOT YET WORK UNDER NEW I/O.

----------------------------------------------------------------
NEW FUNCTIONS:
----------------------------------------------------------------
(↑G)	SIGNALS A ↑G QUIT; IT REPLACES (IOC G).

(IN <FILE>) READS IN A FIXNUM FROM A BINARY INPUT FILE AND
	RETURNS IT.  TO GET A BINARY FILE, SEE THE NEW
	OPEN FUNCTION.

(OUT <FILE> <FIXNUM>) OUTPUTS THE FIXNUM TO THE BINARY
	FILE AND RETURNS T.

(TRUENAME <FILE>) GIVES THE "TRUE NAME" OF THE FILE,
	AS OPPOSED TO THE FILE NAMES USED TO OPEN IT.
	THIS IS THE NAME FOUND AFTER TRANSLATIONS AND
	LINKS, ETC. (IT IS THE NAME RETURNED BY A .RCHST
	ON THE FILE'S CHANNEL.)

ECHOFILES IS A VARIABLE WHICH, IF NON-NIL, SHOULD BE A
	LIST OF OUTPUT FILES.  THESE OUTPUT FILES
	RECEIVE EVERY CHARACTER SEEN AS INPUT BY TYI
	(AND FUNCTIONS WHICH USE TYI, SUCH AS READ).
	IF A FILE IS A MEMBER OF BOTH THE ECHOFILES
	AND OUTFILES LISTS, IT WILL BE A "DRIBBLE
	FILE", RECORDING BOTH INPUT AND OUTPUT.
	NOTE THAT THE FUNCTION WHICH PRE-SCANS TTY INPUT
	AND PERFORMS RUBOUT PROCESSING LAMBDA-BINDS
	ECHOFILES TO NIL, SO YOU WON'T SEE RUBBED-OUT
	CHARACTERS.

(OPEN <FILE> <MODELIST>) OPENS A FILE AND RETURNS A
	CORRESPONDING FILE OBJECT.  IT IS ACTUALLY AN LSUBR
	OF ZERO TO TWO ARGUMENTS.  THE <FILE> DEFAULTS TO THE
	CURRENT DEFAULT FILE NAMES.  THE <MODELIST> DEFAULTS
	TO NIL.
IF <FILE> IS A NAMELIST OR NAMESTRING, A NEW FILE ARRAY
	IS CREATED.  IF <FILE> IS A FILE ARRAY ALREADY, IT IS
	CLOSED AND RE-OPENED IN THE SPECIFIED MODE; ITS FORMER
	MODES SERVE AS THE DEFAULTS FOR THE <MODELIST>.
	THE <MODELIST> DETERMINES A LARGE NUMBER OF ATTRIBUTES
	FOR OPENING THE FILE.  FOR EACH ATTRIBUTE THERE ARE
	TWO OR MORE MUTUALLY EXCLUSIVE VALUES WHICH MAY BE
	SPECIFIED AS FOLLOWS.  VALUES MARKED BY A * ARE THOSE
	USED AS DEFAULTS WHEN THE <FILE> IS A NAMELIST OR
	NAMESTRING.  IF THE <MODELIST> IS AN ATOM, IT IS THE
	SAME AS SPECIFYING THE LIST OF THAT ONE ATOM.
DIRECTION:
	*  IN		INPUT FILE
	*  READ		SAME AS "IN"
	   OUT		OUTPUT FILE
	   PRINT	SAME AS "OUT"
	   APPEND	OUTPUT, APPENDED TO EXISTING FILE
DATA MODE:
	*  ASCII	FILE IS A STREAM OF ASCII CHARACTERS.
			SYSTEM-DEPENDENT TRANSFORMATIONS MAY
			OCCUR, SUCH AS SUPPLYING LF AFTER CR,
			OR BEING CAREFUL WITH OUTPUT OF ↑P,
			OR MULTICS ESCAPE CONVENTIONS.
	   FIXNUM	FILE IS A STREAM OF FIXNUMS.  THIS
			IS FOR DEALING WITH FILES THOUGHT OF
			AS "BINARY" RATHER THAN "CHARACTER".
	   IMAGE	FILE IS A STREAM OF ASCII CHARACTERS.
			ABSOLUTELY NO TRANSFORMATIONS ARE MADE.
DEVICE TYPE:
	*  DSK		STANDARD KIND OF FILE.
	   TTY		CONSOLE.  IN PARTICULAR, ONLY TTY INPUT
			FILES HAVE INTERRUPT CHARACTER FUNCTIONS
			ASSOCIATED WITH THEM.
BUFFERING MODE:
	*  BLOCK	DATA IS BUFFERED.
	   SINGLE	DATA IS UNBUFFERED.
		IF THE DEVICE TYPE IS TTY, THE DEFAULT IS
		SINGLE INSTEAD OF BLOCK ON ITS.
ECHO MODE:
	   ECHO		OPENS OUTPUT TTY IN ECHO AREA (ITS ONLY).
SOME OF THESE VALUES ARE OF COURSE SYSTEM-DEPENDENT.
	YOUR LOCAL LISP SYSTEM WILL ATTEMPT TO DO THE RIGHT
	THING, HOWEVER, IN ANY CASE.
IF THE OPTIONS LIST IS INVALID IN ANY WAY, OPEN MAY EITHER
	GIVE A WRNG-TYPE-ARGS ERROR, OR BLITHELY ASSUME A
	CORRECTED VALUE FOR AN ATTRIBUTE.  IN GENERAL, ERRORS 
	SHOULD OCCUR ONLY FOR TRULY CONFLICTING SPECIFICATIONS.
	ON THE OTHER HAND, SPECIFYING BLOCK MODE FOR A DEVICE
	THAT THE SYSTEM WANTS TO HANDLE ONLY IN CHARACTER MODE
	MAY JUST GO AHEAD AND USE CHARACTER MODE.
(OPENI X)  ==  (OPEN X 'READ)
(OPENO X)  ==  (OPEN X 'PRINT)
(OPENA X)  ==  (OPEN X 'APPEND)

(RUBOUT <CHAR> <FILE>) ATTEMPTS TO RUB OUT ONE CHARACTER.
<CHAR> SHOULD BE A FIXNUM BETWEEN 0 AND 177 (AN ASCII VALUE).
<FILE> SHOULD BE A TTY OUTPUT FILE; IF OMITTED, T IS ASSUMED.
IF IT IS NOT POSSIBLE TO RUB OUT THE CHARACTER CORRECTLY,
RUBOUT WILL RETURN NIL INSTEAD OF T; IT IS UP TO THE CALLER
TO DO SOMETHING ABOUT THIS CASE.  CHARACTERS WHICH CANNOT
CORRECTLY BE RUBBED OUT INCLUDE TAB AND CARRIAGE RETURN.
IF THE OUTPUT TTY CAN DO CURSOR POSITIONING AND SELECTIVE
RASURE, THEN THE CHARACTER IS RUBBED OUT BY ERASING IT
FROM THE SCREEN AND BACKING UP THE CURSOR; OTHERWISE, THE
CHARACTER IS PRINTED ON THE TTY (RUBOUT ECHO).

(SSTATUS TTYSCAN <FUNCTION> <FILE>) SETS UP A TTY PRE-SCAN
FUNCTION FOR <FILE>, WHICH MUST BE A TTY INPUT FILE.
IF <FILE> IS OMITTED, T IS ASSUMED.
THE <FUNCTION> SHOULD ACCEPT THREE ARGUMENTS:
	(1) THE FILE TO DO PRE-SCANNING FOR.
	(2) THE INPUT FUNCTION TO PRE-SCAN FOR.
	    POSSIBILITIES ARE READ, TYI, READLINE,
	    EDIT, AND PERHAPS OTHERS.
	(3) THE NUMBER OF HANGING LEFT PARENTHESES, AS
	    A FIXNUM (MEANINGFUL ONLY IF ARGUMENT 2
	    IS 'READ).
IT IS THE RESPONSIBILITY OF THE PRE-SCAN FUNCTION TO
READ IN SOME CHARACTERS FROM THE FILE HANDED TO IT AS
ITS FIRST ARGUMENT, AND TO RETURN A LIST OF FIXNUMS
BETWEEN 0 AND 177 OCTAL.  TYPICALLY THE PRE-SCAN FUNCTION
WILL PROVIDE FOR RUBOUT PROCESSING, ETC.
IF THE PRE-SCAN FUNCTION RETURNS NIL, AN END-OF-FILE
WILL BE SIGNALED FOR THE TTY INPUT FILE.  THIS IS A WAY
TO SIGNAL OVER-RUBOUT.
(THE INITIAL LISP SYSTEM PROVIDES FOR THE INITIAL TTY INPUT
FILE A PRE-SCAN FUNCTION WHICH DOES STANDARD RUBOUT PROCESSING.)
(STATUS TTYSCAN <FILE>) NATURALLY RETURNS THE PRE-SCAN
FUNCTION FOR <FILE> (T IF <FILE> IS OMITTED).


----------------------------------------------------------------
THINGS WHICH HAVE CHANGED FROM OLD I/O AND NOT IN THE MANUAL:
----------------------------------------------------------------

IN NEW I/O FILES ARE SPECIFIED BY MEANS OF NAMESTRINGS AND
NAMELISTS AS DOCUMENTED IN THE MANUAL.
THERE IS FURTHERMORE A COMPATIBILITY FEATURE WHICH ALLOWS
OLD I/O 4-LISTS TO BE USED INTERCHANGEABLY WITH NEW I/O
NAMELISTS.  IF THE CAR OF A PUTATIVE NAMELIST IS ATOMIC,
THEN IT IS ASSUMED TO BE AN OLD I/O 4-LIST.
FINALLY, NEW I/O ON THE PDP-10 KNOWS MOST STANDARD DEVICE
NAMES; IF IT SEES A NAME WHERE A DEVICE BELONGS, AND IT IS
NOT ONE OF THE STANDARD DEVICE NAMES, AND NO SNAME WAS
SUPPLIED, THEN THE NAME IS TAKEN TO BE THE SNAME, AND *
IS SUPPLIED FOR THE DEVICE.
ALL THESE COMPATIBILITY FEATURES ARE FOR THE PDP-10 ONLY!
EXAMPLES:
	THESE ARE ALL EQUIVALENT AS FILE NAMES:
		(FOO BAR * GLS)
		(FOO BAR GLS)
		((GLS) FOO BAR)
		((* GLS) FOO BAR)
THE ARGUMENT TO AN OLD I/O FUNCTION IS ONE OF THESE LISTS;
THUS ONE MAY SAY EQUIVALENTLY:
		(UREAD FOO > * GLS)
		(UREAD FOO > DSK GLS)	;IF YOUR DEFAULT DEV IS DSK:
		(UREAD FOO)		;IF YOUR DEFAULT IS DSK:GLS;
					; BECAUSE UREAD SUPPLIES >
		(UREAD (GLS) FOO)	;IF YOUR DEFAULT DEV IS DSK:
		(UREAD (DSK GLS) FOO)
		(UREAD (DSK GLS) FOO >)

HERE ARE DEFINITIONS OF THE OLD I/O FUNCTIONS IN TERMS OF THE
NEW ONES.  THEY MAY BE TAKEN QUITE LITERALLY.
(DEFUN UREAD FEXPR (FILENAME)
       (UCLOSE)
       ((LAMBDA (FILE)
		(EOFFN FILE
		       (FUNCTION
			  (LAMBDA (EOFFILE EOFVAL)
				  (SETQ UREAD NIL))))
		(INPUSH (SETQ UREAD FILE))
		(CAR (DEFAULTF FILE)))
	(OPEN (*UGREAT FILENAME) 'IN)))

(DEFUN UCLOSE FEXPR (X)
       (COND (UREAD
	      (AND (EQ UREAD INFILE) (INPUSH -1))
	      (CLOSE (PROG2 NIL UREAD (SETQ UREAD NIL))))
	     (T NIL)))

(DEFUN UWRITE FEXPR (DEVDIR)
       (OR DEVDIR (SETQ DEVDIR (CAR (DEFAULTF NIL))))
       (*UWRITE (CONS DEVDIR (COND ((STATUS FEATURE DEC10)
				    (CONS (STATUS JNAME) '(OUT)))
				   ((STATUS FEATURE ITS)
				    '(.LISP. OUTPUT))))
		'OUT
		(LIST DEVDIR)))

(DEFUN UAPPEND FEXPR (FILENAME)
       (PROG2 (SETQ FILENAME (*UGREAT FILENAME))
	      (*UWRITE FILENAME 'APPEND FILENAME)
	      (RENAME UWRITE
		      (COND ((STATUS FEATURE DEC10)
			     (CONS (STATUS JNAME) '(OUT)))
			    ((STATUS FEATURE ITS)
			     '(/.LISP/. APPEND))))))

(DEFUN *UWRITE (NAME MODE NEWDEFAULT)	;INTERNAL ROUTINE
       (COND (UWRITE
	      (SETQ OUTFILES (DELQ UWRITE OUTFILES))
	      (CLOSE UWRITE)
	      (SETQ UWRITE NIL)))
       ((LAMBDA (FILE)
		(SETQ OUTFILES
		      (CONS (SETQ UWRITE FILE)
			    OUTFILES))
		(CAR (DEFAULTF NEWDEFAULT)))
	(OPEN NAME MODE)))

(DEFUN UFILE FEXPR (SHORTNAME)
       (COND ((NULL UWRITE)
	         (ERROR 'NO/ UWRITE/ FILE
			(CONS 'UFILE SHORTNAME)
			'IO-LOSSAGE))
	     (T (PROG2 NIL
		       (CAR (DEFAULTF (RENAME UWRITE
					      (*UGREAT SHORTNAME))))
		       (SETQ OUTFILES (DELQ UWRITE OUTFILES))
		       (CLOSE UWRITE)
		       (SETQ UWRITE NIL)))))

(DEFUN CRUNIT FEXPR (DEVDIR)
       (CAR (DEFAULTF (AND DEVDIR (LIST DEVDIR)))))

(DEFUN *UGREAT (NAME)			;INTERNAL ROUTINE
       (MERGEF (MERGEF NAME
		       (COND ((STATUS FEATURE DEC10)
			      '(* . LSP))
			     ((STATUS FEATURE ITS)
			      '(* . >))))
	       NIL))

(DEFUN UPROBE FEXPR (FILENAME)
       (SETQ FILENAME (MERGEF (*UGREAT FILENAME) NIL))
       (AND (PROBEF FILENAME) FILENAME))

(DEFUN UKILL FEXPR (FILENAME)
	    (DEFAULTF (DELETEF FILENAME))))



CURSORPOS MAY TAKE AN EXTRA ARGUMENT TO DETERMINE WHICH OUTPUT
TTY TO DO THE CURSOR POSITIONING ON.  IF THE LAST ARGUMENT CAN
BE TAKEN TO BE A TTY, IT IS.
ONE INCOMPATIBILITY IS THAT (CURSORPOS 'T) NOW MEANS GET THE
COORDINATES OF TTY "T" RATHER THAN GO TO THE TOP OF THE SCREEN.
TO GO TO THE TOP OF THE SCREEN FOR THE DEFAULT TTY, USE
(CURSORPOS 'TOP) OR (CURSORPOS 124) OR (CURSORPOS 'T T).

LISTEN SIMILARLY TAKES AN OPTIONAL ARGUMENT TELLING WHICH INPUT
TTY TO LISTEN TO.  NOTE THAT (LISTEN T) IS NOT QUITE THE SAME
AS (LISTEN); THE LATTER MERELY RETURNS THE RESULT OF A .LISTEN,
WHILE THE FORMER ACCOUNTS FOR BUFFERED-UP CHARACTERS WITHIN LISP.

TYIPEEK NOW TAKES UP TO THREE ARGUMENTS.
THE FIRST ARGUMENT IS AS IN OLD I/O; IT SPECIFIES THE KIND
OF PEEKING.  A FIRST ARGUMENT OF NIL IS THE SAME AS NO ARGUMENT
AT ALL, EXCEPT THAT YOU NEED IT TO GET IN THE OTHER TWO
ARGUMENTS.  THESE EXTRA ARGUMENTS ARE AS FOR READ, NAMELY
A FILE AND/OR EOF VALUE (WHICH SHOULD BE A FIXNUM).
AN INCOMPATIBLE CHANGE IS THAT TYIPEEK BY DEFAULT RETURNS
-1 INSTEAD OF 3 AT END OF FILE AND NEWIO.

(STATUS FILEMODE <FILE>) RETURNS A DOTTED PAIR WHOSE CAR
IS A LIST OF VALID OPTIONS TO THE OPEN FUNCTION, DESCRIBING
THE ATTRIBUTES OF THE FILE, AND WHOSE CDR IS A LIST OF
SEMI-SYSTEM-DEPENDENT SYMBOLS DESCRIBING ATTRIBUTES WHICH CANNOT
BE FED TO OPEN.  AMONG THESE ATTRIBUTES ARE:
	RUBOUT		THIS TTY CAN SELECTIVELY ERASE.
	SAIL		THIS TTY HAS THE SAIL CHARACTER SET.
	CURSORPOS	THIS TTY CAN DO CURSOR POSITIONING.

(SSTATUS TTYCONS <TTY1> <TTY2>) EFFECTIVELY BINDS TWO TTY
FILES INTO A SINGLE CONSOLE.  ONE OF THE TTY'S SHOULD BE AN
INPUT TTY, AND THE OTHER AN OUTPUT TTY.  INITIALLY THE
SYSTEM PERFORMS (SSTATUS TTYCONS T T) FOR YOU.
(STATUS TTYCONS <TTY>) RETURNS THE TTY WHICH THE ONE YOU
SPECIFIED IS LINKED TO, OR NIL IF IT ISN'T LINKED.
THIS IS USEFUL, FOR EXAMPLE, IN A **MORE** INTERRUPT,
TO DETERMINE WHICH INPUT TTY TO READ THE CHARACTER FROM.

(STATUS TTYINT <CHAR> <INPUT TTY>)
(SSTATUS TTYINT <CHAR> <FUNCTION> <INPUT TTY>)
THESE STATUS FUNCTION ARE USED TO SET UP AND EXAMINE
INTERRUPT CHARACTER FUNCTIONS FOR TTY INPUT FILES.
IF <FILE> IS OMITTED, T (THE STANDARD TTY) IS ASSUMED.
<CHAR> SHOULD BE EITHER A NUMERIC ASCII VALUE, OR
A SINGLE CHARACTER OBJECT.  NOTE THAT <CHAR> IS ALWAYS
EVALUATED, UNLIKE (STATUS CHTRAN), FOR EXAMPLE.
<FUNCTION> SHOULD BE EITHER A FUNCTION OF TWO ARGUMENTS
OR A FIXNUM.  IF IT IS A FUNCTION, THEN WHEN THE INTERRUPT
OCCURS IT RECEIVES AS ARGUMENTS THE FILE ON WHICH THE
INTERRUPT OCCURRED, AND THE CHARACTER TYPED, AS A FIXNUM.
IF THE FUNCTION IS A FIXNUM, IT REPRESENTS THE INTERNAL
SYSTEMIC INTERRUPT INITIALLY ASSOCIATED WITH THAT CHARACTER.
THUS, FOR EXAMPLE:
	(SSTATUS TTYINT 7
		 '(LAMBDA (F CH) (PRINC '|WHY DID YOU TYPE ↑G? |)))
	(SSTATUS TTYINT 6 7)
WILL CAUSE ↑F T DO A "↑G QUIT", AND ↑G MERELY TO PRINT THE
MESSAGE "WHY DID YOU TYPE ↑G? ".
NOTE THAT AN INTERRUPT CAN BE ASSOCIATED WITH ANY ASCII
CHARACTER, NOT JUST CONTROL CHARACTERS.  (FOR A FRUSTRATING
EXPERIENCE, SET ")" TO BE A "↑G QUIT".)  ON ITS, HOWEVER,
ONE MUST USE (SSTATUS TTY) TO TELL ITS THAT THINGS LIKE
"?" OR "#" ARE TO BE CONSIDERED INTERRUPT CHARACTERS
(THIS IS SIMILAR TO THE ACTIVATION CHARACTER PROBLEM).
THE MEANINGFUL SYSTEMIC INTERRUPT VALUES ARE:
  OCTAL VALUE	CHAR	WHAT IT DOES
	3	↑C	(SETQ ↑D NIL)
	4	↑D	(SETQ ↑D T)
	7	↑G	↑G QUIT
	22	↑R	(SETQ ↑R T)
	24	↑T	(SETQ ↑R NIL)
	26	↑V	(SETQ ↑W NIL)
	27	↑W	(SETQ ↑W T)
	30	↑X	↑X QUIT
	32	↑Z	RETURN TO DDT
THE DIFFERENCE BETWEEN (SSTATUS TTYINT 1 4) AND
(SSTATUS TTYINT 1 '(LAMBDA (F CH) (SETQ ↑D T)))
IS THAT THE FORMER WILL LET THE INTERRUPT HAPPEN AND
TAKE EFFECT EVEN IF IN A PLACE WHERE A GENERAL USER
FUNCTION MAY NOT BE RUN, E.G. IN THE MIDDLE OF A GARBAGE
COLLECTION.
NOTE THAT INITIALLY ↑S IS SET TO BE LIKE ↑W AS AN
INTERRUPT CHARACTER (SEE BELOW).

↑Q IS NO LONGER INITIALLY AN INTERRUPT CHARACTER,
BUT A SPLICING MACRO AND FORCE-FEED WHOSE DEFINITION
IS (LAMBDA NIL (SETQ ↑Q T) NIL).  THIS HAS THE SAME
EFFECT WHEN TYPED AT THE KEYBOARD AS BEFORE, BUT
PREVENTS CERTAIN TIMING SCREWS.

↑S NO LONGER DOES (SETQ ↑Q NIL).  INSTEAD, IT IS THE
SAME AS ↑W AS AN INTERRUPT CHARACTER.  UNLIKE ↑W,
IT IS ALSO A SPLICING MACRO AND FORCE-FEED, WITH THE
DEFINITION (LAMBDA NIL (SETQ ↑W NIL) (TERPRI) NIL).
THUS IF A LONG PRINTOUT IS COMING AT YOU, JUST TYPE
↑S AND YOU WILL SEE A TERPRI WHEN CONTROL RETURNS TO
THE KEYBOARD.  THIS IS LIKE ↑S IN DDT, AND REPLACES
THE OLD TRICK OF TYPING ↑W AND THEN (IOC V).

↑Z NO LONGER DOES A :VK TO DDT.

↑U NO LONGER RELEASES THE PAGEPAUSE (WHICH IS ALSO GONE).

↑B AND ↑E DO NOT TOGGLE LPT OUTPUT.
LOSERS CAN PROGRAM THIS FOR THEMSELVES.
SEE ML:GLS;NIFTY QIO.

↑H IS ALPHABETIC IN NEW I/O, FOR COMPATIBILITY WITH
MULTICS, AND SO YOU CAN UNDERLINE NAMES.  BEWARE!
A<BACKSPACE>← IS NOT THE SAME ATOM AS ←<BACKSPACE>A.
(THERE WILL EVENTUALLY BE A USER-PROGRAMMABLE
SOLUTION TO THIS "BUG" - A LINE CANONICALIZER.)

↑B IN NEW I/O GIVES A "↑B BREAK", WHICH IS THE SAME AS
THE "↑H BREAK" OF OLD I/O.

FOR TTY OUTPUT FILES ON ITS, THE ENDPAGEFN IS NOT TRIPPED WHEN
THE LINENUM EXCEEDS PAGEL.  RATHER, THE **MORE** INTERRUPT
IS USED, WHICH IS MORE ACCURATE FOR DETECING THE BOTTOM OF
THE SCREEN.  WHEN THE TTY REACHES THE BOTTOM OF THE SCREEN,
THE ENDPAGEFN FOR THE TTY IS INVOKED; IT RECEIVES AS ARGUMENT
THE FILE ON WHICH THE INTERRUPT OCCURRED.

HERE ARE SOME NEAT FUNCTIONS FOR USING THE **MORE** FEATURE
(THEY LIVE IN ML:GLS;NIFTY QIO):

(DECLARE (SPECIAL **MORE** MORE-FLUSH))
(SETQ **MORE** '##MORE##)
(SETQ MORE-FLUSH NIL)

;;; TTY-ENDPAGEFN IS AN ENDPAGEFN FOR THE TTY FOR PROCESSING
;;; **MORE** INTERRUPTS.  WHAT IT DOES DEPENDS ON TWO
;;; GLOBAL VARIABLES (BOUND BY THE CATCHMORE MACRO):
;;;   **MORE**	      MORE-FLUSH      ACTION
;;;	NIL		NIL		NOTHING
;;;	NON-NIL		NIL		"DUMB" MORE PROCESSING;
;;;					I.E. PRINT THE VALUE
;;;					OF **MORE** AND WAIT FOR
;;;					THE LOSER TO TYPE SOMETHING,
;;;					BUT NO PROVISION FOR FLUSHING
;;;	NIL		NON-NIL		FLUSH IMMEDIATELY BY DOING
;;;					(THROW NIL CLEVER-MORE).
;;;					THIS IS GOOD FOR PRINTING
;;;					EXACTLY ENOUGH TO FILL A SCREEN.
;;;	NON-NIL		NON-NIL		"SMART" MORE PROCESSING;
;;;					I.E. PRINC THE VALUE OF
;;;					**MORE** AND WAIT FOR A
;;;					CHARACTER.  IF SPACE OR
;;;					RUBOUT, GOBBLE IT.  IF IT
;;;					WAS SPACE, JUST RETURN;
;;;					OTHERWISE FLUSH BY PRINC'ING
;;;					MORE-FLUSH AND DOING
;;;					(THROW NIL CLEVER-MORE).

(DEFUN TTY-ENDPAGEFN (FILE)
       (COND (**MORE** (PRINC **MORE**)
		       ((LAMBDA (IFILE)
				((LAMBDA (CH)
					 (AND (OR (= CH 40)
						  (= CH 177))
					      (TYI IFILE))
					 (COND ((AND MORE-FLUSH
						     (NOT (= CH 40)))
						(PRINC MORE-FLUSH)
						(THROW NIL CLEVER-MORE))
					       (T (CURSORPOS NIL 0 FILE)
						  (CURSORPOS 'L FILE)
						  (CURSORPOS 'T FILE))))
				 (TYIPEEK NIL IFILE)))
			(OR (STATUS TTYCONS FILE) T)))
	     (MORE-FLUSH (THROW NIL CLEVER-MORE))))

(ENDPAGEFN T 'TTY-ENDPAGEFN)

;;; (CATCHMORE X Y Z) EVALUATES Z WITH A **MORE** CATCH
;;; AROUND IT.  THIS COOPERATES WITH TTY-ENDPAGEFN
;;; TO DO **MORE** PROCESSING.
;;; THUS, FOR EXAMPLE, (CATCHMORE '**MORE** 'FLUSHED <STUFF>)
;;; WHERE <STUFF> DOES SOME PRINTING WILL PERFORM THE
;;; STANDARD KIND OF **MORE** PROCESSING, FLUSHING <STUFF>
;;; IF A NON-SPACE IS TYPED.
;;; THE MACRODEF MACRO-DEFINER LIVES IN ML:GLS;MACROS >.

(MACRODEF CATCHMORE (MOREMSG FLUSHMSG . BODY)
	  (CATCH ((LAMBDA (**MORE** MORE-FLUSH) . BODY)
		  MOREMSG FLUSHMSG)
		 CLEVER-MORE))

(DEFUN DIR FEXPR (X)		;LIST AN ITS FILE DIRECTORY
       (TERPRI)
       (CURSORPOS 'C)
       ((LAMBDA (FILE)
		(CATCHMORE '|---TYPE SPACE FOR MORE---|
			   '|OH, WELL, SO MUCH FOR THAT...|
			   (DO ((CH (TYI FILE) (TYI FILE)))
			       ((= CH 14))
			       (TYO CH)))
		(CLOSE FILE))
	(OPEN (CONS (CONS 'DSK X) '(/.FILE/. /(DIR/)))))
       (ASCII 0))

FASLOADING WITHIN A FASLOAD WORKS PRETTY WELL.
NATURALLY, YOU CAN ONLY FASLOAD *BETWEEN* FUNCTION;
"EVALUATED CONSTANTS" WITHIN A FUNCTION MAY NOT
DO FASLOADS.  (IF YOU DON'T UNDERSTAND THIS LAST ITEM,
DON'T WORRY.)

FORCE-OUTPUT IS AS IN THE MANUAL; IT FORCES AN BUFFER OUT.
CLEAR-INPUT AND CLEAR-OUTPUT BOTH EXIST.  ON ITS THEY ARE
MEANINGFUL ONLY FOR TTY FILES, THOUGH THEY DON'T HURT ON
ANY OTHER FILES.

THE STATUS CALLS BELOW ARE EQUIVALENT TO THE
EXPRESSIONS TO THE RIGHT, AND ARE INCLUDED ONLY
FOR COMPATIBILITY WITH OLD I/O.  AVOID USING THESE
STATUS CALLS IN NEW CODE.
NOTE THAT (STATUS UREAD) ETC. RETURNS A NEW I/O NAMELIST,
WHICH IS NOT QUITE OF THE SAME FORM AS AN OLD I/O 4-LIST.

(STATUS UREAD)        <=>  (TRUENAME UREAD)
(SSTATUS UREAD ...)   <=>  (UREAD ...)
(STATUS UWRITE)       <=>  (CAR (TRUENAME UWRITE))
(SSTATUS UWRITE ...)  <=>  (UWRITE ...)
(STATUS CRFILE)       <=>  (CDR (DEFAULTF NIL))
(SSTATUS CRFILE ...)  <=>  (DEFAULTF '(...))
(STATUS CRUNIT)       <=>  (CRUNIT NIL)
(SSTATUS CRUNIT ...)  <=>  (CRUNIT ...)

FOR COMPATIBILITY WITH OLD I/O, IF THE FILE IS OMITTED
IN THE STATUS CALLS BELOW, THE VALUE T (THE STANDARD
INITIAL TTY) IS ASSUMED.

(STATUS TTY X) HANDS BACK THE TTYST1, TTYST2, AND TTYSTS
	VARIABLES FOR THE TTY INPUT FILE X AS A LIST
	OF THREE FIXNUMS.

(SSTATUS TTY M N X) SETS THE TTYST1 AND TTYST2 VARIABLES
	FOR THE TTY INPUT FILE X TO THE FIXNUMS M AND N.

(STATUS TTYREAD X) HANDS BACK THE TTYREAD SWITCH FOR THE
	TTY INPUT FILE X.  IF NIL, THEN ONLY FORCE-FEED
	CHARACTERS CAUSE THE TTY PRE-SCAN FUNCTION TO
	RETURN WITH ITS BUFFERED LIST OF CHARACTERS.

(SSTATUS TTYREAD VAL X) SETS THE SWITCH TO T OR NIL
	ACCORDING TO VAL.

(STATUS LINMODE X) HANDS BACK THE LINMODE SWITCH FOR THE
	TTY INPUT FILE X.  IF T, THEN ONLY CARRIAGE
	RETURNS CAUSE THE TTY PRE-SCAN FUNCTION TO
	RETURN WITH ITS BUFFERED LIST OF CHARACTERS.

(SSTATUS LINMODE VAL X) SETS THE LINMODE SWITCH.
	IT ALSO AFFECTS THE ACTIVATION BITS IN
	THE TTYST1 AND TTYST2 VARIABLES.

----------------------------------------------------------------
THINGS WHICH HAVE DISAPPEARED IN NEW I/O, NOT TO BE IMPLEMENTED
----------------------------------------------------------------
(STATUS INTERRUPT) AND (SSTATUS INTERRUPT) DO NOT EXIST
IN NEWIO.  (ENDPAGEFN <FILE> <FUNCTION>) IS USED TO SET UP
**MORE** INTERRUPTS; (SSTATUS TTYINT) IS USED TO SET FUNCTIONS
FOR INTERRUPT CHARACTERS.  ALL OTHER INTERRUPT FUNCTIONS
ARE THE VALUES OF ATOMIC SYMBOLS, AND SO CAN BE SET UP
WITH SETQ.  THE NAMES OF THESE VARIABLES ARE:

ALARMCLOCK		UNDF-FNCTN
AUTOLOAD		UNBND-VRBL
ERRSET			WRNG-TYPE-ARG
*RSET-TRAP		UNSEEN-GO-TAG
GC-DAEMON		WRNG-NO-ARGS
GC-OVERFLOW		GC-LOSSAGE
PDL-OVERFLOW		FAIL-ACT
			IO-LOSSAGE

THE ONLY ONE OF THESE WHICH IS NEW IN NEWIO IS AUTOLOAD,
WHICH HOLDS THE AUTOLOAD INTERRUPT HANDLER.

LOADARRAYS AND DUMPARRAYS NO LONGER EXIST.  A MORE GENERAL
NEW I/O PRIMITIVE WILL EVENTUALLY ENABLE THE USER TO WRITE
THESE FUNCTIONS FOR HIMSELF (A STANDARD PACKAGE EQUIVALENT
TO THE OLD ONES WILL BE PROVIDED).

IOC NO LONGER EXISTS IN NEW I/O.  USE THE FOLLOWING
	TABLE OF EQUIVALENCES:
(IOC C) <=> (SETQ ↑D NIL)
(IOC D) <=> (SETQ ↑D T)
(IOC G) <=> (↑G)
(IOC Q) <=> (SETQ ↑Q T)
(IOC R) <=> (SETQ ↑R T)
(IOC S) <=> (SETQ ↑Q NIL)
(IOC T) <=> (SETQ ↑R NIL)
(IOC V) <=> (SETQ ↑W NIL)
(IOC W) <=> (CLEAR-OUTPUT (SETQ ↑W T))
(IOC X) <=> (↑X)
(IOC Z) <=> (VALRET ':VK/ )
TO INVOKE USER INTERRUPT FUNCTIONS, JUST FUNCALL THEM.

IOG NO LONGER EXISTS.  INSTEAD OF (IOG NIL ...) SAY INSTEAD
	((LAMBDA (↑Q ↑R ↑W) ...) NIL NIL NIL).

(STATUS IOC), (SSTATUS IOC) NO LONGER EXIST.
	THEIR EFFECT CAN BE DUPLICATED BY USING
	SETQ, FUNCALL, OR THE NEW ↑X AND ↑G
	FUNCTIONS.

(STATUS TERPRI), (SSTATUS TERPRI) NO LONGER EXIST.
	TO GET THEIR EFFECT, USE THE LINEL FUNCTION
	TO SET THE LINEL FOR EACH OUTPUT FILE TO 0.
	(A LINEL OF ZERO MEANS INFINITY.)

(STATUS PAGEPAUSE), (SSTATUS PAGEPAUSE) NO LONGER EXIST.
	THEY HAVE BEEN SUPERSEDED BY THE **MORE**
	INTERRUPT FEATURE.

2/7/75   - JONL AND GLS -

BRIEF SYNOPSIS:
[1] THE VALUE OF PRIN1 CONTROLS USE OF PRIN1 BY LISP.
[2] NEW COMPLR SWITCHES, AND DECLARATIONS, AND THINGS:
	[2A] ↑↑ NOW ENTERS MAKLAP.
	[2B] COMPILER-STATE TO DETERMINE STATE OF COMPILER.
	[2C] EXPR-HASH (E SWITCH) FOR FUNCTION HASHING.
	[2D] THE GLOBAL VARIABLE "SOBARRAY" HOLDS THE ARRAY POINTER 
	     TO THE STANDARD LISP OBARRAY.
	[2E] EOC-EVAL TO EVAL THINGS AFTER COMPILATION IS COMPLETED.
	[2F] COUTPUT TO OUTPUT THINGS TO THE LAP FILE.
	[2G] DONT EVER, BUT EVER, USER "QUOTE" AS A LAMBDA OR 
	     PROG VARIABLE.
[3] VALUE OF DEFUN CONTROLS EXPR-HASH CROCK IN INTERPRETER.
[4] USE PLIST AND SETPLIST TO ACCESS AND STORE PROPERTY LISTS
[5] "ROMAN" APPEARS ON THE FEATURE LIST [GOTTEN BY (STATUS FEATURES),
    OR TESTED BY (STATUS FEATURE ROMAN)] IF THAT HACK IS ASSEMBLED IN.
[6] ON A DEC-10 MONITOR, (STATUS JNAME) RETURNS "NNNLSP".
[7] ← FIXNUM OUTPUT FORMAT EXTENDED TO ←22, ←11.
[8] (STATUS FREE ...), (SSTATUS FREE ...) FLUSHED.
[9] MANY CHANGES TO THE BREAK AND *BREAK FUNCTIONS:
	[4A] BREAK OF THREE ARGUMENTS NO LONGER EXISTS.
	[4B] BREAK/*BREAK LAMBDA-BIND *, +, -.
	[4C] ([S]STATUS BREAKLEVEL) IS LIKE ([S]STATUS TOPLEVEL).
	[4D] BREAK USES A CATCH; (THROW <VALUE> BREAK) EXITS.
    ALSO, AN ATTEMPT TO EXPLAIN BREAK AND TOPLEVEL IN EXPR CODE

----------------------------------------------------------------

[1] THE VALUE OF THE ATOM "PRIN1" NOW CONTROLS THE ACTION OF
    PRINTING BY THE TOP-LEVEL AND BREAK ROUTINES.  IN SHORT, AN
    ITEM X RESULTING FROM THE EVALUATION IN THESE LOOPS IS
    PRINTED LIKE 
	     (COND (PRIN1 (FUNCALL PRIN1 X)) 
		   (T     (PRIN1 X)))
    THIS FEATURE EXISTS PRIMARILY FOR THE OWL SYSTEM, WHICH HAS 
    CIRCULAR LIST STRUCTURE ABUNDANT, AND DOESN'T NEED TO
    REWRITE THE ENTIRE TOP-LEVEL ROUTINE MERELY TO ACCOUNT FOR 
    THE PRINTING OF CIRCULAR STRUCTURE.

[2] SOME NEW SWITCHES AND DECLARATIONS FOR THE COMPILER:
  [2A] TYPING ↑↑ NOW ENTERS MAKLAP [JUST AS IN MACSYMA, WHERE ↑↑
	DOES A (CONTINUE)].
  [2B] COMPILER-STATE
	THIS VARIABLE REVEALS TO THE USER ONE OF THREE STATES
	THAT THE COMPILER MAY BE IN, AND IS OF INTEREST TO 
	SOMEONE WHO WANTS TO WRITE SOPHISTICATED MACROS WHICH
	EXPAND  IN DIFFERENT WAYS DEPENDING ON THE REASON FOR
	THE EXPANSION.  POSSIBLE VALUES FOR COMPILER-STATE:
	  [2B1] "TOPLEVEL"
		THE COMPILER IS AT THE TOP LEVEL OF LISP.
	  [2B2] "MAKLAP"
		THE COMPILER IS SCANNING AN INPUT FILE LOOKING
		FOR FUNCTION DEFINITIONS TO COMPILE.  IN THIS
		STATE THE COMPILER WILL EXPAND ANY TOP-LEVEL
		FORM (FOO ...) FOR WHICH FOO HAS A MACRO
		PROPERTY TO SEE IF A FUNCTION DEFINITION IS
		PRODUCED [WHICH WOULD THEN BE COMPILED].
	  [2B3] "COMPILE"
		THE COMPILER IS ACTUALLY COMPILING A FORM
		WHICH IS A FUNCTION DEFINITION, PRODUCING
		LAP CODE.  IN THIS STATE ANY SUB-FORM
		(FOO ...) WHICH IS TO BE COMPILED IS EXPANDED
		IF FOO HAS A MACRO PROPERTY.
	RANDOM EXAMPLE:
	WHEN A FUNCTION IS DEFINED YOU WANT THE FLATSIZE OF
	THE DEFINITION TO BE PUT ON THE PROPERTY LIST OF
	THE FUNCTION.  IF THE FUNCTION IS COMPILED, YOU WANT
	TO ARRANGE TO OUTPUT AN APPROPRIATE DEFPROP INTO
	THE LAP FILE.
	(DEFUN STRANGE-DEFUN MACRO (FORM)
	       ;DO THE MACRO THING (NOT HAIRY)
	       (RPLACA FORM 'DEFUN)
	       ;NOW HACK THE FLATSIZE THING
	       (COND ((OR (NULL (BOUNDP COMPILER-STATE))
			  (EQ COMPILER-STATE 'TOPLEVEL))
		      ;IF INTERPRETING, OR AT COMPILER TOPLEVEL,
		      ; JUST GO AHEAD AND DO THE PUTPROP
		      (PUTPROP (CADR FORM)
			       (FLATSIZE FORM)
			       'STRANGE-FLATSIZE))
		     
		     ((EQ COMPILER-STATE 'MAKLAP)
		      ;IF COMPILING A TOP-LEVEL FORM FROM A FILE,
		      ; ARRANGE FOR A DEFPROP IN THE LAP FILE
		      (COUTPUT (LIST 'DEFPROP
				      (CADR FORM)
				      (FLATSIZE FORM)
				      'STRANGE-FLATSIZE)))
		     ((EQ COMPILER-STATE 'COMPILE)
		      ;WE DON'T WANT A DEFPROP IN THE
		      ; MIDDLE OF ANY LAP CODE!
		      (ERROR 'STRANGE-DEFUN/ IN/ SUBFORM
			     FORM
			     'FAIL-ACT))))
  [2C] EXPR-HASH
	THIS FEATURE CONTROLS THE AUTOMATIC OUTPUTTING BY THE 
	COMPILER OF A DEFPROP FOR EACH FUNCTION COMPILED WHICH
	DEFINES AN "EXPR-HASH" PROPERTY FOR THAT FUNCTION.  THIS
	PROPERTY IS A NUMBER, WHICH IS THE SXHASH OF THE
	LAMBDA-FORM STORED AS THE EXPR PROPERTY OF THE FUNCTION
	WHEN USED IN EXPRFORM.  THE INTENDED USE OF THIS IS TO
	HAVE A QUICK, AUTOMATIC SCHEME TO DECIDE WHICH FUNCTIONS
	HAVE BEEN EDITED SINCE COMPILATION, AND TO READ IN THE
	EXPR VERSIONS OF THOSE CHANGED FUNCTIONS.  STORING THE
	SXHASH OF THE LAMBDA DEFINITION OF THE FUNCTION LENDS
	ITSELF TO SIMPLE, QUICK, AND NON-SPACE-CONSUMING (IF NOT
	COMPLETELY FOOLPROOF) METHODS.  IT IS SET EITHER BY
	A DECLARATION
		(DECLARE (EXPR-HASH <T-OR-NIL>))
	OR BY USING THE "E" SWITCH IN THE MAKLAP COMMAND LINE.
	[SEE ITEM [3] BELOW FOR AN ASSOCIATED CHANGE IN DEFUN.]
  [2D] SOBARRAY 
	THIS VARIABLE HOLDS A POINTER TO THE STANDARD LISP OBARRAY, 
	IN WHICH THE COMPILER ITSELF IS RESIDENT.   "COBARRAY" HOLDS 
	THE ARRAY POINTER TO THE COMPILER'S OBARRAY USED WHILE 
	COMPILING FILES.  THESE TWO VARIABLES FACILITATE WRITING 
	OBARRAY-SWITCHING FUNCTIONS.
  [2E] EOC-EVAL
	THIS VARIABLE HOLDS A LIST OF FORMS TO BE EVALUATED
	AFTER COMPILATION OF A FILE HAS BEEN COMPLETED.  ONE CAN
	SET IT FROM A DECLARE, OR USE THE FUNCTION "EOC-EVAL"
	WHICH CONSES THE ITEMS OF THE CALLING FORM ONTO THE LIST
	STORED IN EOC-EVAL.  AT THE TIME OF COMPLETION OF
	COMPILATION, (MAPC 'EVAL EOC-EVAL) IS DONE.
	EOC-EVAL IS RESET BY INITIALIZATION, OR BY THE WHIM
	OF THE USER.
  [2F] COUTPUT
	THIS FUNCTION SHOULD BE USED TO OUTPUT RANDOM FORMS
	TO THE LAP FILE.  THIS IS CURRENTLY DONE BY USING
	PRINT; THUS ONE USED TO SAY, FOR EXAMPLE
		(DECLARE (PRINT (LIST 'SETQ
				      'VERSION
				      (CADR (STATUS UREAD)))))
	IT IS ANTICIPATED, HOWEVER, THAT EVENTUALLY THE COMPILER
	MAY NOT WRITE A LAP FILE, BUT WILL BUFFER UP FORMS
	FOR THE ASSEMBLY PASS.  THEREFORE THE FUNCTION
	COUTPUT SHOULD BE USED INSTEAD:
		(DECLARE (COUTPUT (LIST 'SETQ
					'VERSION
					(CADR (STATUS UREAD)))))
	WHICH WILL DO THE CORRECT THING IN THE FUTURE
	WHEN THE BUFFERING MODE MATERIALIZES.

[3] THE VALUE OF THE VARIABLE DEFUN CONTROLS A CROCK IN THE
    WORKINGS OF THE FUNCTION DEFUN.  IF THE VALUE OF DEFUN
    IS NON-NIL, THEN EVALUATING (DEFUN FOO ...) WILL SUCCEED
    IN CREATING THE NEW DEFINITION ONLY IF EITHER:
	[A] FOO HAS NO EXPR-HASH PROPERTY.
	[B] FOO HAS AN EXPR-HASH PROPERTY, BUT IT IS NOT
	    THE SAME AS SXHASH OF THE LAMBDA FORM FOR THE
	    NEW DEFINITION.
    THUS A POOR MAN'S WAY TO USE THE COMPILER'S EXPR-HASH
    FEATURE IS TO COMPILE A  FILE WITH THE (E) SWITCH,
    LOAD IT INTO A LISP, EDIT THE FILE SOME, DO (SETQ DEFUN T),
    THEN JUST READ IN THE UPDATED SOURCE, AND THE EXPR-HASH
    SCHEME WILL (PROBABLY) REDEFINE ONLY THOSE FUNCTIONS
    WHICH HAVE CHANGED, AND LEAVE THE SUBR VERSIONS IN FORCE
    FOR UNCHANGED FUNCTIONS, PROBABLY.

[4] THE NEW SUBR OF ONE ARGUMENT, PLIST, IS USED TO RETRIEVE THE 
    PROPERTY LIST OF A SYMBOL;  THIS FUNCTION WORKS ON ALL SYMBOLS 
    INCLUDING NIL, WHEREAS CDR WILL WORK ONLY FOR NON-NULL SYMBOLS 
    IN NON-*RSET MODE.  SIMILAR REMARKS HOLD FOR THE NEW SUBR OF TWO 
    ARGUMENTS, SETPLIST.  (SETPLIST X (PLIST X)) SHOULD BE A NOOP.

[5] IF "ROMAN" IS A FEATURE OF THE LISP YOU ARE USEING, THEN
    YOU CAN TRY (SETQ IBASE 'ROMAN) OR (SETQ BASE 'ROMAN) FOR
    FUN AND GAMES;  OTHERWISE, NO.

[6] IN THE DEC-10 VERSION OF MACLISP, (STATUS JNAME) RETURNS
    THE ATOMIC SYMBOL "NNNLSP", WHERE NNN IS THE JOB NUMBER
    IN DECIMAL.  THIS IS A STANDARD FIRST FILE NAME FOR
    TEMPORARY FILES, ETC.

[7] TO MAKE THE ← FORMAT OF FIXNUM OUTPUT MORE USEFUL,
    THE FOLLOWING FORMATS ARE NOW USED [WHEN IBASE IS 8
    AND (STATUS ←) IS T]:
	IF THE NUMBER IS SMALLER THAN 2**18., 
	   OR IF THE LOW NINE BITS IN THE BINARY REPRESENTATION 
	   ARE NOT ALL ZERO, 
	  THEN THE ← FORMAT IS NOT USED.
	IF THE LOW 41 BITS ARE ALL ZERO, THEN N←41 IS USED.
	IF THE LOW 33 BITS ARE ALL ZERO, THEN N←33 IS USED.
	IF THE LOW 22 BITS ARE ALL ZERO, THEN N←22 IS USED.
	OTHERWISE, N←11 IS USED.
    NOTE THAT THESE CORRESPOND TO QUARTER-WORD BOUNDARIES
    (EXCEPT N←41); BUT N←11 IS NOT USED IF 6 OR FEWER
    DIGITS WOULD SUFFICE.

[8] (STATUS FREE ...) AND (SSTATUS FREE ...) HAVE BEEN, OR
    SOON WILL BE, FLUSHED, SINCE THEY ARE OBSOLETE AND
    MAINLY A PAIN TO MAINTAIN.

[9] MANY CHANGES TO THE BREAK FUNCTION:
	[9A] BREAK OF THREE ARGUMENTS HAS BEEN FLUSHED.
	     (THE THIRD ARGUMENT USED TO BE A FORM TO BE
	     EVALUATED IF }P WERE TYPED.)
	[9B] *BREAK (ERGO ALSO BREAK) NOW LAMBDA-BINDS
	     *, +, AND - TO THEIR OWN CURRENT VALUES SO THAT
	     THEY WILL BE RESTORED ON EXIT FROM THE BREAK.
	[9C] (STATUS BREAKLEVEL) AND (SSTATUS BREAKLEVEL <FORM>)
	     ARE ANALOGOUS TO (STATUS TOPLEVEL) AND
	     (SSTATUS TOPLEVEL <FORM>).  THE DEFAULT BREAKLEVEL,
	     LIKE THE DEFAULT TOPLEVEL, IS A READ-EVAL-PRINT
	     LOOP WHICH UPDATES *, +, AND - PROPERLY.
	[9D] BREAK HAS BEEN REDEFINED USING CATCH, WITH A
	     CATCH-TAG OF "BREAK".  IF AT ANY TIME WITHIN A
	     BREAK THE FORM (THROW <VALUE> BREAK) IS EXECUTED,
	     THE BREAK (OR *BREAK) FUNCTION WILL BE EXITED,
	     RETURNING <VALUE>.  THUS, FOR EXAMPLE, IF ONE
	     TIRES OF TYPING (RETURN '(FOO)) TO UNBND-VRBL
	     BREAKS OR WHATEVER, ONE MIGHT DEFINE A MACRO-
	     CHARACTER
		(SETSYNTAX '/: 'MACRO
			   '(LAMBDA NIL
				    (THROW (LIST (READ)) BREAK)))
	     AND SIMPLY TYPE  :FOO  AT THE UNBND-VRBL BREAK
	     TO USE THE VARIABLE FOO INSTEAD.

    BELOW IS A NEW DEFINITION OF THE BREAK AND *BREAK FUNCTIONS W
    WRITTEN IN LISP, AS WELL AS A HALF-HEARTED ATTEMPT AT
    EXPLAINING THE TOP LEVEL LOOP.

(DEFUN BREAK FEXPR (X)
       (*BREAK (EVAL (CADR X)) (CAR X))	;NOTE ARGUMENT REVERSAL

;;; THE FIRST ARGUMENT TO BREAK IS A SWITCH, WHICH IF NIL CAUSES 
;;; IMMEDIATE EXIT WITH NOTHING BEING DONE; 
;;; OTHERWISE, THE VARIABLES ↑Q, ↑W, AND EVALHOOK ARE BOUND
;;; TO NIL, AND THE VARIABLES *, +, AND - ARE BOUND TO THEIR
;;; CURRENT VALUES, AND THE MESSAGE ";BKPT <BREAKID>" IS PRINTED.
;;; A READ-EVAL-PRINT LOOP SIMILAR TO THE TOP LEVEL LOOP
;;; IS THEN ENTERED.  THIS BREAK LOOP IS SURROUNDED BY AN
;;; ERRSET AND A CATCH.  ERRORS MERELY CAUSE THE BREAK
;;; LOOP TO BE RE-ENTERED.
;;; THE VALUE OF (STATUS BREAKLEVEL) SERVES A FUNCTION
;;; SIMILAR TO THAT OF (STATUS TOPLEVEL) IN THE TOP LEVEL
;;; LOOP.
;;; AS EACH FORM IS READ IN THE DEFAULT BREAK LOOP, THERE ARE
;;; FOUR CASES:
;;;	[1] END OF FILE.  THIS INDICATES OVER-RUBOUT AND
;;;	    SIMPLY CAUSES A TERPRI.
;;;	[2] THE FORM IS THE ATOM }P.  *BREAK RETURNS NIL.
;;;	[3] THE FORM IS (RETURN <VALUE>).  THE FORM <VALUE>
;;;	    IS EVALUATED AND RETURNED.
;;;	[4] OTHERWISE, THE FORM IS EVALUATED AND THE RESULT
;;;	    PRINTED OUT IN A MANNER ANALOGOUS TO THE TOP
;;;	    LEVEL READ-EVAL-PRINT LOOP.  THE VARIABLES +, -,
;;;	    AND * ARE UPDATED APPROPRIATELY.  (RECALL, HOWEVER,
;;;	    THAT THEY WERE BOUND ON ENTRY TO *BREAK, AND SO
;;;	    WILL BE RESTORED EVENTUALLY.)
;;; THE WAY TO RETURN FROM A BREAK IS TO DO A THROW WITH
;;; A TAG OF "BREAK"; THIS WILL RETURN FROM THE CATCH WHICH
;;; SURROUNDS THE BREAK LOOP.  THIS IS HOW CASES [2] AND [3]
;;; RETURN THEIR VALUES; CASE [4] MAY ALSO CAUSE A RETURN FROM
;;; THE BREAK.

(DECLARE (SPECIAL }Q ↑W EVALHOOK * + -))

(DEFUN *BREAK (BREAKP BREAKID)
       (AND BREAKP
   	    ((LAMBDA (↑Q ↑W EVALHOOK * + -)
		     (TERPRI)
		     (PRINC '/;BKPT/ )
		     (PRINC BREAKID)
		     (SETQ + -)
		     (CATCH (DO NIL
				(NIL)
				(ERRSET (DO ((EOF (LIST NIL)) (FORM))
					    (NIL)
					    (COND ((STATUS BREAKLEVEL)
						   (EVAL (STATUS BREAKLEVEL)))
						  (T (SETQ FORM (READ EOF))
						     (COND ((EQ FORM EOF) (TERPRI))
							   ((EQ FORM '}P)
							    (THROW NIL BREAK))
							   ((EQ (CAR FORM) 'RETURN)
							    (THROW (EVAL (CADR FORM))
								   BREAK))
							   (T (SETQ - FORM)
							      (SYSPRINT (SETQ *
									      ((LAMBDA (+)
										       (EVAL FORM))
									       (PROG2 NIL +
										      (SETQ + -)))))
							      (TERPRI))))))))
			    BREAK)
		     (OR (STATUS LINMODE) (TERPRI)))
	     NIL
	     NIL
	     NIL
	     *
	     +
	     -)))

(DEFUN SYSPRINT (X)		;INTERNAL PRINTING FUNCTION
       (OR (STATUS LINMODE) (TERPRI))
       (COND (PRIN1 (FUNCALL PRIN1 X))
	     (T (PRIN1 X)))
       (TYO 40))

(DEFUN STANDARD-TOP-LEVEL NIL
       (PROG (↑Q ↑W ↑R EVALHOOK BASE IBASE ...)
	ERRS		;ERRORS, UNCAUGHT THROWS, ETC. COME HERE
	     (RESET-BOUND-VARS)
	↑G		;↑G QUITS COME HERE
	     (RESET-INTERNAL-TOP-LEVEL-VARS)
	     (RESTORE-THE-WORLD)
	     (DO-DELAYED-INTERRUPTS)
;RECALL THAT ERRORS DO (SETQ // ERRLIST) SO LAMBDA-BINDING ERRLIST WORKS
	     (MAPC (FUNCTION EVAL) //)
	     (AND (STATUS LINMODE) (TERPRI))
	     (SETQ * '*)
	     (DO ((EOF (LIST NIL))) (NIL)
		 (RESET-INTERNAL-TOP-LEVEL-VARS)
		 (SETQ * (COND ((STATUS TOPLEVEL)
				(EVAL (STATUS TOPLEVEL)))
			       (T (SYSPRINT *)
				  (TERPRI)
				  (DO ((FORM (READ EOF) (READ EOF)))
				      ((NOT (EQ FORM EOF))
				       (SETQ - FORM))
				      (TERPRI))
				  ((LAMBDA (+) (EVAL -))
				   (PROG2 NIL + (SETQ + -)))))))))

(DEFUN RESTORE-THE-WORLD NIL
       (RESET-THE-PDLS)
       (SETQ ↑Q NIL)
       (SETQ EVALHOOK NIL)
       (RESTORE-THE-IO-SYSTEM)
       (ENABLE-SYSTEM-INTERRUPTS)
       (RESET-INTERNAL-GC-MARK-BITS))

(DEFUN DO-DELAYED-INTERRUPTS NIL
       (OR INTERNAL-NOINTERRUPT-SWITCH
	   (PROCESS-PENDING-ALARMCLOCK-AND-TTY-INTERRUPTS)))
12/8/74  JONL & GLS 

Remember, BIBOP LISP is now the standard system LISP!
  [As of version number 958].

LISTARRAY has been extended to be an LSUBR.  an optional second 
  argument puts a bound on the number of elements to LISTIFY.
  For example, (LISTARRAY ary 5) lists only the first five elements
  of ary;  while (LISTARRAY ary), as before, lists all elements. 
  note that (LISTARRAY ary (APPLY 'TIMES (CDR (ARRAYDIMS ary))))
  also lists all elements.

MAKOBLIST, MAKREADTABLE, and BLTARRAY have been flushed.  If you 
  used them before, you can substitute calls as in the table below:
 
    FOR THIS CODE		  USE THIS INSTEAD

  (BLTARRAY x y)		(FILLARRAY Y X)
				  ;note reversal of args
  (MAKREADTABLE x)		(*ARRAY x 'READTABLE)
	    x not T or NIL
  (MAKREADTABLE t-or-nil)	(*ARRAY (GENSYM) 'READTABLE t-or-nil)

  (MAKOBLIST x)			(*ARRAY x 'OBARRAY)
	  x not NIL
  (MAKOBLIST NIL)		(LISTARRAY 
				 OBARRAY 
				 (- (CADR (ARRAYDIMS 'OBARRAY)) 129.))

Note that FILLARRAY is consistent in that it always transfers
  the contents of its second arg into the first, and returns
  the first (an array).  Note too that this means that when
  replacing a BLTARRAY by a FILLARRAY, you must reverse the args.


SYMEVAL lives!  If you know that you are evaluating an atomic symbol,
  it will be faster to use SYMEVAL rather than the general-purpose 
  EVAL.  In particular, as soon as BIBOP LISP becomes the settled 
  standard, SYMEVAL will compile optimally into two instructions.

In *RSET mode, all car-cdr calls are checked at each level to see 
  that CAR or CDR is applied only to proper data.  This checking is 
  not done by compiled code [which usually open-codes car-cdr ings]
  [this is not really true, because compiled code calls functions
  like CDDDDR, even if the user does not explicitly use them],
  nor when *RSET = NIL.  CAR and CDR are variables which control 
  the checking as follows:
		LIST		can hack only lists
		NIL		can hack lists and NIL
		SYMBOL		can hack lists, NIL, and symbols
		T		can hack anything.
  When in *RSET mode, the value of CDR controls the permissible
  operations for the function CDR, and the value of CAR controls 
  the permissible operations for the function CAR.
FRIDAY  SEPT 13,1974   LQ+4D.19H.41M.28S.   LISP 909  - GLS -

BRIEF SYNOPSIS:

[1] NEW FUNCTION: FSC. SIMILAR TO LSH AND ROT.
[2] NEW STATUS OPTION: (STATUS TTYSIZE).
[3] REMPROP CHANGED TO RETURN USEFUL QUANTITY.
[4] ISQRT HAS BEEN FLUSHED. CODE BELOW SUPERSEDES IT.
[5] (EXPT X .5) IS INHERENTLY LESS ACCURATE THAN (SQRT X).
[6] FASLOAD FILES CAN BE CONCATENATED.
[7] (IOC W) PROBLEM EXTENDS TO IOG. GRUMBLE. BEWARE!
----------------------------------------------------------------
[1] NEW FUNCTION: FSC IS ANALOGOUS TO ROT AND LSH.
    IT ACCEPTS EITHER FIXNUMS OR FLONUMS, AND ACTS UPON
    THE BITS GIVEN IT; I.E. LIKE ROT AND LSH IT DOES NOT
    DO THE FLOAT OR FIX FUNCTION. UNLIKE ROT AND LSH, HOWEVER,
    FSC RETURNS A FLONUM. NOTE THAT THE FSC PDP-10 INSTRUCTION
    NORMALIZES THE RESULT. THIS IS A PDP-10 DEPENDENT FUNCTION!
    (FSC N 0) IN PARTICULAR IS INTENDED TO BE THE INVERSE
    OF (LSH N 0); NAMELY, IT TAKES A FIXNUM AND MAKES THE
    BITS OF THAT FIXNUM INTO A FLONUM (THAT IS, IT USES THE
    FIXNUM AS THE MACHINE REPRESENTATION OF THE FLONUM).
    IN GENERAL, (= F (FSC (LSH F 0) 0)) FOR ANY FLONUM F,
    BUT (= X (LSH (FSC X 0) 0)) FOR FIXNUM X IFF X IS
    THE REPRESENTATION OF A *NORMALIZED* PDP-10 FLONUM.

[2] (STATUS TTYSIZE) RETURNS A DOTTED PAIR OF THE TTY'S CURRENT
    HEIGHT AND WIDTH (ANALOGOUS TO CURSORPOS OF NO ARGS).
    THESE ARE THE PARAMETERS AS RETURNED BY THE SYSTEM, WHICH
    PRESUMABLY ARE SETTABLE VIA :TCTYP.

[3] REMPROP, IF IT FINDS THE PROPERTY TO REMOVE, INSTEAD OF
    RETURNING T, RETURNS THE CELL OF THE PROPERTY LIST WHOSE
    CAR IS THE PROPERTY (THIS CELL WAS SPLICED OUT FROM THE
    PROPERTY LIST).

[4] ISQRT HAS BEEN FLUSHED FROM THE LISP SYSTEM. THE LISP
    CODE BELOW IS MORE ACCURATE AND WORKS ON BIGNUMS.

	(DEFUN BSQRT (N)
	       (BSQRT1 (ABS N)
		       (EXPT 2 (// (1+ (HAULONG N)) 2))))

	(DEFUN BSQRT1 (N GUESS)
	       ((LAMBDA (NEXT)
			(COND ((LESSP NEXT GUESS)
			       (BSQRT1 N NEXT))
			      (T GUESS)))
		(*QUO (*PLUS GUESS (*QUO N GUESS)) 2)))

    THIS IS ESSENTIALLY A NEWTON ITERATION (DUE TO GOSPER)
    WITH APPROPRIATE PRECAUTIONS FOR INTEGER TRUNCATION.

[5] (EXPT X .5) IS INHERENTLY LESS ACCURATE THAN (SQRT X).
    USE THE LATTER WHEN YOU KNOW IT'S SQRT.

[6] IF YOU CONCATENATE SEVERAL FASLOAD FILES SO THAT THE
    BEGINNING *FASL* OF THE NEXT FOLLOWS THE TERMINATING *FASL*
    OF THE PREVIOUS ONE, THEN FASLOAD WILL GO 'ROUND THE
    FASLOAD CYCLE AGAIN AND LOAD IT UP TOO. CURRENTLY
    THERE IS NO CONVENIENT WAY TO CONCATENATE FASLOAD FILES,
    BUT I NEVER PROMISED YOU A ROSE GARDEN.

[7] REMEMBER THE (IOC W) BUG, GANG? IT STILL HAUNTS US!
    NAMELY, (IOC W) RESETS THE TTY OUTPUT BUFFER, THUS POSSIBLY
    LOSING CHARACTERS FROM THE PREVIOUS OUTPUT FUNCTION.
    THE RIGHT WAY TO DO IT IS (SETQ ↑W T). WELL, IT FOLLOWS
    THAT (IOG W <FORMS>) ISN'T THE RIGHT THING EITHER.
    THE RIGHT THING IS (IOG NIL (SETQ ↑W T) <FORMS>).
    I DON'T LIKE IT EITHER.

[8] POOR SIGNP!

    AUG 17, 1974    LISP 893    - GLS AND JONL -

[1] A NEW LAP, INCOMPATIBLE WITH OLDER LISPS, IS STANDARD
[2] NEW FUNCTIONS: ↑, ↑$. EXPT EXTENDED.
[3] NEW EDITOR COMMANDS: SS, RS, PC.
[4] BOUNDP HAS BEEN CHANGED TO SAVE CONSING.
[5] ERRFRAME HAS BEEN CHANGED TO GIVE OUT MORE INFO.
[6] THROWING OUT OF A TTY INTERRUPT CAN LEAD TO LOSSAGE.
[7] DONT USE (IOC W) IF YOU REALLY WANT (SETQ ↑W T).
[8] NCOMPLR RECOGNIZES "COMPLR (INIT)" FILES.
[9] IN LISP, YOU CAN NOW (SETQ IBASE 'ROMAN).  DITTO FOR BASE.

----------------------------------------------------------------
[1] LAP 81 IS THE STANDARD LAP NOW, AND IS WHAT YOU GET BY 
    AUTOLOAD.  SINCE IT WILL NOT WORK IN LISPS WITH VERSION
    NUMBERS LESS THAN 892, YOU WILL HAVE TO RETRIEVE THE OLDER
    LAP EXPLICITLY IF YOU NEED IT.  DO (FASLOAD LAP OFASL COM)
    BEFORE TRYING TO USE LAP IN AN OLDER LISP.
        LAP NOW USES THE VALUE OF THE VARIABLE FASLOAD IN THE
    SAME WAY FASLOAD ITSELF DOES: IF IT IS NIL, THEN  MESSAGES
    ABOUT FUNCTIONS REDEFINITIONS ARE SUPPRESSED.  ALSO, LAP
    NOW TRIES TO DO PURE LOADINGS WHEN THE VALUE OF "PURE" IS
    NON-NIL.

[2] NEW FUNCTIONS:
	↑ TAKES TWO FIXNUMS A AND B, AND RETURNS A TO THE B'TH
	    POWER AS A FIXNUM (MODULO 2↑35.). WILL NOT DO BIGNUM
	    ARITHMETIC.
	↑$ TAKES A FLONUM AND A FIXNUM, RETURNING A FLONUM.
	EXPT HAS BEEN EXTENDED. IF THE EXPONENT IS A FLONUM,
	    THEN THE BASE IS CONVERTED TO A FLONUM, AND THEN
	    THE FORMULA      B       (B LOG A)
			    A   =   E
	    IS USED, USING THE LOG AND EXP FUNCTIONS.

[3] NEW COMMANDS FOR THE BINFORD EDITOR:
	SS (SAVE SPOT) GOBBLES THE NAME OF AN ATOMIC
	    SYMBOL, AND SETQ'S IT TO THE CURRENT EDITOR
	    CONTEXT.
	RS (RESTORE SPOT) GOBBLES SUCH A SETQ'D ATOMIC SYMBOL
	    AND MAGICALLY MOVES THE EDITOR'S CURSOR TO THE
	    SAVED SPOT.
	PC (PRINT CONTEXT) GOBBLES UP TO TWO FLONUMS (TERMINATE
	    WITH $$) AND, USING THEM FOR THE PRINLEVEL AND
	    PRINLENGTH, PRINTS THE CURRENT LEVEL OF LIST
	    STRUCTURE. IF YOU DON'T SUPPLY TWO ARGS,
	    DEFAULTS OF 4 ARE USED.

[4] BOUNDP IS NOW A PURE PREDICATE; IT RETURNS T OR NIL.
    ONE CAN GET THE OLD EFFECT OF BOUNDP BY SAYING
	(AND (BOUNDP X) (CONS NIL (EVAL X))).
    THERE WILL SOOON BE A SPECIAL FUNCTION FOR OBTAINING THE
    VALUE OF A SYMBOL, WHICH WILL RUN A LITTLE FASTER THAN 
    "EVAL", AND WHICH WILL COMPILE QUITE OPTIMALLY.  THUS,
    (AND (BOUNDP X) (SYMEVAL X))  WILL COMPILE INTO MUCH
    FASTER CODE THAN THE WILL THE CURRENT FORM:
	(AND (SETQ FOO (BOUNDP X)) (CDR FOO))

[5] ERRFRAME HAS BEEN CHANGED TO GIVE YOU MORE INFORMATION.
    FORMERLY THE THIRD ITEM OF THE RETURNED LIST WAS THE
    ERROR MESSAGE ONLY. NOW IT IS A LIST OF FROM ONE TO
    THREE THINGS. IF IT IS ONE THING, IT IS THE ERROR MESSAGE.
    YOU CAN PRINC THIS TO RE-CREATE THE ERROR PRINTOUT.
    IF THERE ARE TWO THINGS, THE FIRST IS THE MESSAGE AND THE
    SECOND IS THE LOSING ITEM. IF THERE ARE THREE THINGS,
    THEY ARE THE ERROR MESSAGE, THE LOSING ITEM, AND THE
    TYPE OF ERROR (E.G. FAIL-ACT OR UNBND-VRBL).
    IN SHORT, YOU GET A LIST OF THINGS SUCH THAT
	(APPLY 'ERROR (CADDR (ERRFRAME NIL)))
    WILL RE-CREATE THE SAME ERROR!

[6] PEOPLE HAVE BEEN WRITING TTY INTERRUPT FUNCTION LIKE
	(SSTATUS INTERRUPT 15.
		'(LAMBDA NIL (THROW NIL TO-TOP-LEVEL))).
    THERE IS A DANGER IN THIS: RECALL THAT WHEN A TTY USER
    INTERRUPT IS RUN, THE SYSTEM DOES AN IMPLICIT
	(NOINTERRUPT 'TTY)
    FOR YOU TO PREVENT TIMING ERRORS. IF YOU EXIT THE USER
    INTERRUPT ABNORMALLY, YOU MUST RESET NOINTERRUPT YOURSELF.
	(SSTATUS INTERRUPT 15.
		'(LAMBDA NIL (NOINTERRUPT NIL)
			     (THROW NIL TO-TOP-LEVEL)))
    ALTERNATIVELY, THE TOP LEVEL COULD SAY
	(NOINTERRUPT NIL)
    AFTER CATCHING THE THROW, POSSIBLY A SAFER ALTERNATIVE
    IN SOME CASES.

[7] LOSERS NOTE: (IOC W) IS NOT THE SAME AS (SETQ ↑W T).
    IN GENERAL, WHEN YOU JUST WANT TO SET AN I/O SWITCH,
    USE SETQ UNLESS YOU ARE AWARE OF THE SIDE EFFECTS INVOLVED.
    (IOC W) IN PARTICULAR PERFORMS A SYSTEM (= ITS) I/O
    RESET, CLEARING THE TTY OUTPUT BUFFER. IF ANY CHARS
    ARE PENDING IN THE BUFFER FOR OUTPUT FROM THE PREVIOUS
    PRINT, THEY WILL BE FLUSHED. THUS
		(PROG2 (PRINC 'FOOBAR) (IOC W))
    IS VERY LIKELY NOT TO PRINT ANYTHING AT ALL! OR MAYBE
    JUST THE "F" IF YOU ARE LUCKY. (PROG2 (PRINC 'FOOBAR)
    (SETQ ↑W T)) DOES WHAT YOU WANT AND LETS THE "FOOBAR"
    PRINT OUT.

[8] NCOMPLR WILL LOOK FOR A "COMPLR (INIT)" FILE WHEN IT IS
    STARTED UP, AND IF FOUND, WILL UREAD AND READ-EVAL IT IN.
    YOU CAN FASLOAD OTHER FILES FROM THIS INIT FILE, BUT
    CURRENTLY CANNOT UREAD OTHER FILES.  THE INIT FILE MAY
    BE EITHER ON YOUR DIRECTORY, OR ON THE "(INIT)" DIRECTORY.

MONDAY  JULY 29,1974	FQ+3D.1H.24M.28S.   LISP 873  - GLS -


THIS LISP RECENT IS SHORT, BUT ITEM [2] IS OF GREAT IMPORTANCE.
THE PREVIOUS LISP RECENT APPEARS AT THE END OF THIS ONE SINCE
IT HASN'T BEEN AROUND FOR VERY LONG.

BRIEF SYNOPSIS:

[1] *RSET-TRAP FUNCTION IS ALWAYS RUN AND MUST CHECK *RSET ITSELF
[2] (CAR NIL) AND (CDR NIL) ARE ALWAYS NIL
[3] DUMPARRAYS/LOADARRAYS NOW KNOW ABOUT FIXNUM AND FLONUM ARRAYS
----------------------------------------------------------------
[1] THE *RSET-TRAP USER INTERRUPT IS ALWAYS RUN WHEN AN
    UNCORRECTABLE ERROR IS ABOUT TO POP BACK TO TOP LEVEL
    OR TO AN ERRSET.  IT IS UP TO THE *RSET-TRAP FUNCTION
    TO CHECK THE *RSET SWITCH FOR ITSELF (THE SYSTEM-SUPPLIED
    *RSET-TRAP FUNCTION INDEED DOES THIS).

[2] FOR COMPATIBILITY WITH INTERLISP (FOO), THE CAR AND CDR
    OF NIL ARE ALWAYS BUT ALWAYS NIL. NIL STILL HAS A
    PROPERTY LIST, AND GET AND PUTPROP STILL WORK ON IT,
    BUT NIL'S PROPERTY LIST IS NOT ITS CDR (CROCK, CROCK).
    THE CLAIM IS THAT ONE CAN WRITE CODE SUCH AS
	(CADDR X)
    INSTEAD OF THE MORE TIME- AND SPACE-CONSUMING
	(AND (CDR X) (CDDR X) (CADDR X))
    AND SO ON. SEND COMPLAINTS TO GLS, BUT I DOUBT IT WILL
    DO YOU ANY GOOD.

[3] DUMPARRAYS AND LOADARRAYS WILL NOW DO THE CORRECT THING
    WITH FIXNUM AND FLONUM ARRAYS.  OLD DUMPARRAYS FILES ARE
    STILL GOOD - THE HACK IS UPWARD COMPATIBLE.
FRIDAY  JULY 19,1974   NM+8H.29M.40S.   LISP 861   - GLS -

BRIEF SYNOPSIS:

[1] NEW FUNCTIONS:  UPROBE, UCLOSE, UAPPEND
[2] DEFPROP NOW DOES REMPROP FIRST, AS DEFUN ALWAYS HAS
[3] (NOINTERRUPT 'TTY) - NEW NOINTERUPT OPTION
[4] PDLFRAME HAS DISAPPEARED - USE EVALFRAME
[5] (SSTATUS CRFILE ...)  SETS UREAD FILE NAME DEFAULTS
[6] VALUE OF // INTERACTS WITH ERRLIST; *, +, - MENTIONED
[7] ONE MAY THROW OUT OF A USER INTERRUPT NOW
[8] APPLYFRAMES WIN BETTER - FEAR NOT
[9] UNPURIFY$G DEPURIFIES ALL PAGES - PURIFY$G WILL REPURIFY THEM
[:] COMPLR/NCOMPLR HAVE PRIVATE OBARRAY AS WELL AS READTABLE
[;] MIDAS AND FASLOAD COOPERATE
----------------------------------------------------------------
[1] THREE NEW FUNCTIONS FOR OLD I/O:
   [1A] UPROBE TAKES ARGUMENTS LIKE UREAD, AND TRIES TO FIND
	THE FILE SPECIFIED.  IF IT EXISTS, UPROBE RETURNS THE
	ACTUAL FILE NAMES; IF NOT, IT RETURNS NIL.
   [1B] UCLOSE (OF NO ARGUMENTS) CLOSES THE UREAD INPUT
	CHANNEL.  THIS IS PRIMARILY OF USE BEFORE CALLING THE
	SUSPEND FUNCTION.
   [1C] UAPPEND (ARGUMENTS LIKE UREAD) OPENS THE SPECIFIED
	FILE, WHICH MUST ALREADY EXIST, FOR WRITING.
	THE FILE IS RENAMED TO BE ".LISP. APPEND", AND BECOMES
	NON-ACCESSIBLE (YOU SEE A * NEXT TO IT IN THE
	DIRECTORY).  ANY OUTPUT DIRECTED TO THE UWRITE OUTPUT
	CHANNEL (THE ↑R SWITCH) IS THEN OUTPUT TO THIS FILE,
	APPENDED TO THE PREVIOUS CONTENTS.  WHEN THE FILE
	IS EVENTUALLY CLOSED WITH UFILE, IT WILL TAKE ON THE
	FILE NAMES SPECIFIED BY UFILE, AND WILL CONTAIN ITS
	OLD CONTENTS WITH THE NEW MATERIAL TACKED ONTO THE
	END.  NOTE THAT UAPPEND IS REALLY MORE LIKE NCONC
	THAN APPEND! I.E. IT DOES NOT COPY THE FILE, BUT
	ADDS ONTO THE EXISTING ONE, CLOBBERING IN NEW DATA.

[2] DEFPROP USED TO BE DESCRIBED AS
	(DEFUN DEFPROP FEXPR (X)
	       (PUTPROP (CAR X) (CADR X) (CADDR X)))
    THANKS TO AGITATION BY CERTAIN PARTIES, IT IS NOW
	(DEFUN DEFPROP FEXPR (X)
	       (REMPROP (CAR X) (CADDR X))
	       (PUTPROP (CAR X) (CADR X) (CADDR X)))
    THAT IS, DEFPROP IS GUARANTEED TO PUT THE NEW PROPERTY
    AT THE HEAD OF THE PROPERTY LIST.  NOTE THAT DEFUN HAS DONE
    SUCH REMPROPING IN THE PAST ALREADY.

[3] NOINTERRUPT HAS BEEN EXTENDED TO HAVE THREE STATES:
	(NOINTERRUPT T) CAUSES ALL ASYNCHRONOUS USER
		INTERRUPTS TO BE DELAYED (AS BEFORE;
		"ASYNCHRONOUS" INTERRUPTS ARE PRESENTLY
		TTY CONTROL CHARS AND THE ALARMCLOCK)
	(NOINTERRUPT NIL) LETS SUCH INTERRUPTS GO THROUGH
		IMMEDIATELY (THE INITIAL STATE); ANY
		DELAYED INTERRUPTS ARE RUN DURING THIS CALL.
   ***  (NOINTERRUPT 'TTY) CAUSES ONLY TTY INTERRUPTS TO
		BE DELAYED, AND LETS OTHERS GO THROUGH.
		IN THIS WAY ONE CAN SUPPRESS ↑G QUITS, ETC.,
		BUT STILL ALLOW CLOCK INTERRUPTS.

[4] PDLFRAME, A SYNONYM FOR EVALFRAME, HAS DISAPPEARED.
    USE EVALFRAME FROM NOW ON.

[5] (SSTATUS CRFILE FOO BAR) WILL SET THE UREAD FILE NAME
    DEFAULTS TO "FOO BAR".  (STATUS CRFILE) READS THEM,
    AS BEFORE.

[6] THE ATOM // IS NOW A VARIABLE, USED IN CONJUNCTION
    WITH ERRLIST.  WHEN AN ERROR PROPAGATES BACK TO TOP LEVEL,
    THEN WHERE THE TOP LEVEL FORMERLY DID
		(MAPC (FUNCTION EVAL) ERRLIST)
    IT NOW DOES INSTEAD
		(MAPC (FUNCTION EVAL) //)
    AND WHEN AN ERROR OCCURS, THEN (SETQ // ERRLIST)
    IS PERFORMED.  THUS THIS NEW MECHANISM WORKS ALMOST LIKE
    THE OLD, WITH ONE IMPROVEMENT (SUGGESTED MY MACRAKIS):
    ONE CAN LAMBDA-BIND ERRLIST OVER A COMPUTATION, AND IF
    AN ERROR OCCURS THE CURRENT ERRLIST WILL BE USED AND NOT
    THE TOP-LEVEL ERRLIST.  THIS MAY SOMETIMES BE A DESIRABLE
    ALTERNATIVE TO ERRSET.
    RECALL AGAIN THAT *, +, AND - ALSO HAVE MEANINGFUL VALUES:
	*  CONTAINS THE LAST THING TYPED OUT BY LISP'S TOP
	   LEVEL.  THUS IF YOU FORGOT TO TYPE A SETQ AROUND
	   THE PREVIOUS FORM, YOU CAN STILL RETRIEVE THE
	   RESULTANT VALUE.
	+  CONTAINS THE LAST THING READ BY LISP'S TOP LEVEL.
	   THIS IS USEFUL IN CASE OF A TYPING ERROR; YOU CAN
	   SAVE THE FORM AND MAYBE EDIT IT.
	-  CONTAINS THE CURRENT THING READ BY THE TOP LEVEL
	   (WHEN EVALUATION OF THE THING IS COMPLETED, THEN
	   SOMETHING LIKE (SETQ + -) HAPPENS).
    NOTE THAT ERROR BREAKS SAVE +, SO THAT IF YOU SAY:
	(PLUS 3 'A)		;LOSEY LOSEY
	A NON-NUMERIC VALUE	;LISP COMPLAINS
	;BKPT WRNG-TYPE-ARG
	(PLUS 3 5)		;DO SOME STUFF IN THE BREAK
	10
	$P			;RETURN FROM BREAK
	A NON-NUMERIC VALUE	;LISP GRIPES AGAIN
	(SETQ FOO +)		;NOW SAVE VALUE OF +
	(PLUS 3 'A)		;IT IS FORM THAT LOST

[7] FORMERLY USER INTERRUPTS WERE AN IMMOVABLE WALL WITH
    RESPECT TO THROWS; NOW THEY ARE TRANSPARENT.  THIS
    MEANS THAT YOU CAN THROW OUT OF A USER INTERRUPT IN
    THE OBVIOUS MANNER.  EXAMPLE:

	(SSTATUS INTERRUPT 0 '(LAMBDA (X) (THROW NIL ABORT))
	(CATCH (HAIRY-COMPUTATION) ABORT)	;HAIRY MESS

    IN THIS WAY ONE CAN ABORT THE HAIRY MESS BY TYPING ↑@.

[8] SOME PEOPLE HAVE COMPLAINED OF SUPER-SLOWNESS WHEN RUNNING
    IN *RSET MODE.  THIS WAS DUE TO FAULTY DESIGN IN THE
    APPLYFRAME ROUTINES, WHCIH CAUSED CONSING ON EVERY
    FUNCTION CALL.  THIS HAS BEEN CORRECTED, SO DON'T FEAR
    TO USE *RSET MODE NOW.

[9] UNPURIFY$G TO A LISP OR BLISP WILL UNPURIFY ALL PURE
    PAGES IN THE LISP BY COPYING THEM.  THIS IS PRIMARILY
    SO THAT JPG CAN WIN WHEN DUMPING MACSYMA.  PURIFY$G
    WILL THEN REPURIFY THE (COPIED) PAGES.

[:] NCOMPLR WINS WITH ARRAYCALL NOW, BUT COMPLR DOES NOT.
    ALSO, BOTH COMPLR AND NCOMPLR HAVE A PRIVATE OBARRAY
    AS WELL AS READTABLE (CALLED COBARRAY AND CREADTABLE).

[;] GREENBLATT (RG) HAS HACKED MIDAS SO THAT IT CAN PRODUCE
    FASL FORMAT OUTPUT; THUS ONE CAN USE ALL THE MACRO
    FEATURES TO PRODUCE CODE TO LOAD INTO LISP.
    THE FOLLOWING IS A COPY OF  AI:MIDAS;FASL >  WRITTEN BY RG.


FASL Feature In Midas.

	Midas can now assemble FASL files that can be loaded
by LISP in the same manner as LAP FASL output.  This mode is
entered by the .FASL pseudo op, which must appear at the
beginning of the file before any storage words.
	After .FASL has been seen, the assembly becomes a
two pass relocatable assembly.  However, certain
restrictions and "changes of interpretation" apply.
	Global symbols (declared as usual with " or .GLOBAL)
are persmissible. However, since the output is to be loaded
with FASLOAD using DDT's symbol table instead of STINK,
there are quite a few differences in detail.
	For symbols defined within the current assembly, the
only effect of being declared GLOBAL is that the GLOBAL
information is passed on to FASL when the symbol table is
written at the end of pass 2.  This in combination with the
SYMBOLS switch in FASLOAD determines whether the symbol gets
loaded into DDT's symbol table.  If SYMBOLS is NIL, no
symbols will be loaded; if SYMBOLS is EQ to SYMBOLS, only
globals will be loaded; and if SYMBOLS is T, all symbols
(local and global) will be loaded.  Once the symbol is
loaded (or not), the information as to its GLOBALness is
lost and, of course, makes no further difference. The
initial state when LISP is loaded is NIL.
	GLOBAL symbols not defined in the current assembly
are also legal, but there are additional restrictions as to
where in a storage word they may appear and what masking may
be specified (as compared to a normal relocatable assembly).
Briefly, they may appear as in a storage word as a full
word, a right half, a left half, or an accumulator. They may
be negated, but can not be operated on with any other
operator.  Error printouts will be produced if they appear
elsewhere.  When the symbol is encountered by FASLOAD, DDT's
symbol table is consulted.  If it is defined at that time,
OK, otherwise FASLOAD will generate an error.
	Any sort of global parameter assignment or location
assignment is Forbidden.  .LOP, .LVAL1, .LVAL2, etc are not
available.


New Pseudo OPs Available only in FASL assemblies.

	The following pseudos are available to facilitate
the communication between MIDAS assembled programs and LISP
(particularily with regard to list structure).

.ENTRY function type args

	Function is an atom and is taken as the name of
	a function beginning at the current location.  Type
	should be one of SUBR, FSUBR or LSUBR, and has the
	obvious interpretation.  Args is a numeric-valued field
	which is passed thru to FASLOAD and used to construct
	the args property of the function.  If it is zero, no
	args property is created. Otherwise it is considered to
	be a halfword divided into two 9 bit bytes, each of
	which is converted as follows:
		      byte    result
			0	nil
			777	777
	otherwise	n	n-1
	These two items are then CONSed and from the
	args property.

The following pseudos may appear in constants!!

.ATOM atom

	followed by a LISP atom in "MIDAS" format (see below). 
	May only appear in right half (or entire word) of a
	storage word.  Assembles into a pointer to the atom
	header of the specified atom.

.SPECI atom

	similar to .ATOM but assembles into a pointer to the
	SPECIAL value cell of the specified atom.

.FUNCT atom

	similar to .ATOM, but invokes special action by FASLOAD
	in case the PURESW is on. Normally used in function
	calls. Briefly, if FASLOAD is going to purify the
	function it is loading, it must "snap the links" first.
	If .FUNCT is used, the location will be examined by
	FASLOAD and the link snapped if possible before
	purification.
     Typical usage:
	CALL 2,.FUNCT EQUAL	;calls equal as a function of 2 args
				; note: the CALL is not defined
				; or treated specially by MIDAS.

.ARRAY atom

	similar to .ATOM, but assembles into a pointer to the
	Array SAR.

.SX S-expression

	similar to .ATOM, but handles a LISP S-expression. 
	(See below).

.SXEVA S-expression

	reads S expression. This S expression is EVALed (for
	effect presumably) at FASLOAD time.  The resulting
	value is thrown away. Does not form part of storage
	word.

.SXE S-expression

	Similar to .SX but list is EVALed at FASLOAD time.  The
	resulting value is assembled into storage word.


The MIDAS "LISP READER"

	By a conspiracy between MIDAS and FASLOAD, a version
of the LISP reader is available.  However, due to historical
reasons (mostly, i.e. the FASLOAD format was originally
intended only to deal with COMPLR type output), there are a
number of "glitches" (see below for list).  These will
probably tend to go away in the fullness of time.

a) numeric ATOM

	The first character of a LISP atom is examined
specially. If it is a # or &, the atom is declared to be
numeric and either fixed (#) or floating (&).  Midas then
proceeds to input a normal numberic field (terminated, note,
by either space or comma). This value is then "stored" in
the appropriate "space" (fixnum space or flonum space).

b) other ATOMs (also known as PNAME atoms or (LISP) SYMBOLS)

	If the first character of the  atom is not # or &,
the atom is a "PNAME" atom. / becomes a single character
quote character as in LISP.  The atom may be indefinitely
long.  The atom will be terminated by an unquoted space,
carrige return, tab, (, ), or semicolon. Unquoted linefeeds
are ignored and do not become part of the atom.  The
character that terminates the atom is "used up" unless it is
a ( or ). Note that period is a legal constituent of a atom
and does not terminate it or act specially.

c) lists.

	Work normally, but note following caution relative
to dot notation: . does not terminate atoms.  Thus, to
invoke dot notation, the dot must be left delimited by a
space, tab, parenthesis, or other character that does
terminate atoms.

Glitches:

     1) Restriction on pass dependant list
	structure -- In any list reading operation, no new
	atoms not previously encountered may be
	encountered for the first time on pass 2. 
	However, this restriction does not apply to
	atom-only reading operations (.ATOM, .SPECI,
	.FUNCT etc).
     2) Single quote for quoting does not exist (no
	other macro characters exist either.)
     3) Numbers must be flagged as above always.
		MOVEI A,.ATOM 123	;LOSES - gives pointer
					; to PNAME type atom
					; with PNAME 123. it is
					; not numeric.
	use:
		MOVEI A,.ATOM #123	;WINS
     4) No provision exists to reference "GLOBALSYMS"
	in FASLOAD. This mostly means only that DDT must
	be present to load a MIDAS assembled FASL file.
	(some simple COMPLR and LAP FASL files can
	successfully be FASLOADed by, for example, a
	disowned LISP running without a DDT.
     5) LOC is illegal in a FASL assembly.  BLOCK of a
	non-relocatable quantity is ok.
     6) Currently, symbol loading is VERY slow.  Thus
	use SYMBOLS nil, (the initial state) unless
	symbols are necessary.
     7) Midas does not know about any LISP symbols or
	UUOs specially. Use them as globals until someone
	gets around to fixing up a .INSRT file with the
	appropriate defs.
     8) .ATOM "should" be a special case of .SX . 
	However, it is handled separately because of the
	following "reasons":
	     a) The previously noted restriction on pass
		dependent LISTS.
	     b) Midas can do constants optimization on
		atoms ppearing in constants (on both pass one
		and pass two) but not on LISTS. Therefore,
		each list is guaranteed to take a separate
		word in the constants area even if it is
		identical to some other list which also
		appears in a constant.
	     c) Each list takes an additional entry in
		FASLOAD's "atom" table.  This is a temporary
		table that is flushed after the FASLOADing is
		complete.  Of course, .SX still works for
		atoms modulo the above noted restrictions and
		inefficencies.

5/22/74    JONL  

Brief Synopsis:    for LISP 838 and greater

1) SUSPEND - new function, LSUBR of 0 or 1 arguments, like MACDMP,
   but can continue where the computation left off, rather than 
   restarting at top level.
2) MUNKAM  is the inverse of MAKNUM.  On the PDP10 system, is pretty
   much the same as CDR, except that the argument is required to be
   a fixnum, and the COMPLRs will open-code MUNKAM.
3) RANDOM will accept two arguments, as a means of "seeding" it.
   Also, a slight deficiency has been noted.
4) A programmable features list for (STATUS FEATURE foo), and an aid,
   (SSTATUS LINMODE T), for systems with line rather than character 
   oriented TTY input.
5) ARRAYCALL, SUBRCALL, AND LSUBRCALL are now all FSUBRs, and
   take an extra argument to aid NCOMPLR in open-coding these 
   applications.  Disregard  any previous notes on these functions,
   and note well below.
6) Examples of some particularly useful lisp macros, especially for 
   users of ARRAYCALL, SUBRCALL, and LSUBRCALL.
7) The compiler declaration ARRAY* has been extended to allow 
   information about the ranges of indices.  Also, NCOMPLR now uses 
   its own private obarray when compiling a file, in addition to its 
   own private readtable.

--------------------------------------------------------------------

1) (SUSPEND) may be executed at any point in a computation, and 
   control will be returned to the LISP's  superior [DDT or monitor].
   Accumulators, push-down stacks, and other variables will be saved,
   and its starting address will be set so that if the job be dumped
   on dsk, and reloaded at some future time, starting it again will
   cause it to resume where the computation and continue just after 
   the call to SUSPEND.  One limitation:  if any input-output devices
   are in use other than the TTY, SUSPEND will error with a fail-act.
   (SUSPEND s), like (MACDMP s), passes the characters of the symbol
   s to the superior job as a valret string.

2) By "inverse of MAKNUM", the following is meant:
   (EQ X (MUNKAM (MAKNUM X))) evaluates to T for all X.  Shortly, 
   the MULTICS implementation will have a reasonable version of 
   MAKNUM and MUNKAM implemented, so that one may write a 
   hash-coder-on-EQ for s-expressions.  Previous notes in LISP ARCHIV
   have given examples on how to hash an s-expression on EQUAL.  By 
   replacing "(\ (SXHASH X) 777))" with "(\ (MAKNUM X) 777)" one 
   will have a hasher on EQ.

3) By "seeding" RANDOM, one may obtain a variety of starting points,
   corresponding to the various internal states of the two-word state 
   register.  Any two successive outputs of RANDOM will do as the 
   two words for a seed; for example, (SETQ X (RANDOM) Y (RANDOM))
   will preserve the current state of the random number generator 
   in the variables X and Y, and the state may be restored to that
   state [after, possibly, further usage of RANDOM] by (RANDOM X Y).
   Users of RANDOM should take note of a fact which Bill Gosper 
   ferreted out of Knuth - this random number genertor flunks the 
   3-way serial test.  That is, if triplets of "random" numbers 
   <x[n], y[n], z[n]> are generated by clumping together the 
   3n, 3n+1, and 3n+2 outputs of RANDOM, then there will be an   
   interdependency among the triples such that half of all triples
    will be missed - not particularly good for picking "random" 
   points in 3-space.  One way out of this bind is simply
   to use only every other output of RANDOM in generting the triples.

4) As described in previous notes, there is an internal list of 
   "features" describing which of the various MACLISP options are 
   actually available in the LISP being used, and which time-sharing
   system it is running under.  Now the user can create his own
   feature names and add, or delete, from this list at will.  
		(STATUS FEATURE FOO)
   is non-NIL if and only if FOO is on the features list; 
		(SSTATUS FEATURE FOO)
   will add FOO to the features list, and 
		(SSTATUS NOFEATURE FOO)
   will delete it.
			(SSTATUS LINMODE T)
   tells the time-sharing system not to activate your job while
   waiting for TTY input until a carriage-return is typed.  For the 
   TOPS-10 system, it means the basic input instruction is INCHRW 
   instead of INCHR, and that the time-sharing system will handle
   rubouts until the carriage-return is typed.  Since the ITS system
   does not handle rubouts under any circumstances, many  users want
   a mode under which the rubout handler of the MACLISP reader will 
   be effective on a line-by-line basis, and under which no read
   reading is done until a carriage-return is typed.  This can be
   achieved as follows:
	(SSTATUS SYNTAX 13. 501540)
		;makes <cr> an invisible force-feed char
	(SSTATUS LINMODE T)
		;tells ITS to sleep until <cr> or <rubout>
	(SSTATUS TTYREAD T)
		;tells LISP's reader to forget about looking for 
		;"balanced" s-expressions before actually gobbling 
		;up characters from the TTY
   It is worthwile to note here that the "force-feed" option on <cr>,
   and the TTYREAD option are properties of LISP's readtable, while 
   the LINMODE option is a property of the LISP's relation with the 
   time-sharing system.


5) There has long been a certain ambiguity in LISP with respect to
   the meaning of an atomic function.  For (FOO X Y), most LISP
   systems will scan the property list of FOO to see if there are 
   any functional properties [such as SUBR, EXPR, etc], and if so,
   use the first one found as the functional-interpretation of FOO;
   if none are found, then the value of FOO as a variable is picked up,
   and the function-hunting process continues recursively.  Some other 
   systems always pick up the variable value, and never resort to 
   storing subroutine addresses, or LAMBDA forms, as "properties" on 
   a property list.  The function FUNCALL was implemented as a means 
   of directing the MACLISP evaluator first to the variable 
   value as function rather than starting out on the functional
   properties.  Thus, (FUNCALL FOO X Y) is equivalent to 
   (APPLY FOO (LIST X Y)).  However, FUNCALL is essentially an 
   interpretation, and the COMPLR can not open-code the dispatch to 
   the function of interest unless more is known about its calling
   conventions.  For this reason, ARRAYCALL, LSUBRCALL, and SUBRCALL
   have been implemented as FSUBRs.  The general forms are
	(ARRAYCALL type ap i1 . . . in)
	(LSUBRCALL type lfun arg1 . . . argn)
	(SUBRCALL type fun arg1 . . . argn)
   type should be either "FIXNUM", "FLONUM", "T", or "NIL", depending
   on the resulting type of value returned by the function [or on the
   array type, in the case of ARRAYCALL.  Both T-type and NIL-type 
   arrays may be specified by NIL here, which simply means
   "s-expression" array rather than "numeric" array.].  ap should 
   evaluate to an array pointer such as created by *ARRAY 
   [(1) returned by *ARRAY if its first argument is NIL, or (2) put
   on the property list of the given non-NIL symbol].  lfun should 
   evaluate to an LSUBR pointer, which on the PDP10 systems is obtained
   only by doing (GET 'FOO 'LSUBR) for some LSUBR FOO;  similarly, fun 
   should evaluate to a SUBR pointer.  The reason the type argument is 
   required is that NCOMPLR can generate optimal code for these 
   applications.  Versions of NCOMPLR greater than 454 will code these three 
   functions open [COMPLR will not be nearly so optimal in its codings of these 
   three.  Neither will COMPLR actually open-code array references.].
   in the case  of SUBRCALL and LSUBRCALL, the type info is mainly
   an aid to NCOMPLR, and type NIL could always be used as default; 
   however, using type FIXNUM or FLONUM where NIL is required 
   will result in wrong code.  For ARRAYCALL, it will be necessary
   always to have the correct type info since wrong code would result
   from any kind of type mismatch.



    EXAMPLE:  suppose you have done
      (SETQ BARODD (ARRAY NIL FIXNUM N)  BAREVEN (ARRAY NIL FIXNUM N))
    Now at this point, both BARODD and BAREVEN hold as value an array
    pointer.   They would have ARRAY properties on their property list
    if, for example, (ARRAY BARODD FIXNUM N) had been done instead.
    Then the following will fill BARODD with the first N odd integers,
    and BAREVEN with the first N even integers:
      (DO I 1 (1+ I) (> I (* 2 N))
	 (STORE (ARRAYCALL FIXNUM 
			   (COND ((ODDP I) BARODD) (BAREVEN))
			   (/ (1- I) 2))
		I))


6)	EXAMPLE USING MACROS FOR SIMPLIFIED SYNTAX:
      Assuming BARODD and BAREVEN as above [that is, variables that 
    have been set to some array pointer], let us define two macros
    (DEFUN MACRO BO (X) 
	(SUBST (CADR X) 'INDEX '(ARRAYCALL FIXNUM BARODD INDEX)))
    (DEFUN MACRO BE (X)
	(SUBST (CADR X) 'INDEX '(ARRAYCALL FIXNUM BAREVEN INDEX)))
    Then we could fill BARODD and BAREVEN as follows:
      (DO J 1 (1+ J) (> J N) (STORE (BE (1- J)) (* 2 J)))
      (DO J 0 (1+ J) (NOT (< J N)) (STORE (BO J) (1+ (* 2 J))))
    Admittedly, this saves a lot of typing.  But suppose you have a 
    host of such array variables that you would like to abbreviate 
    with such a MACRO.  Typing in all the macro definitions could be 
    tediously repetitive.  Consider the following macro-defining macro,
    and some of its uses:
      (DEFUN MACRO ABBA (Y) 
	(SUBLIS (LIST (CONS 'SHORT (CADR Y)) 
		      (CONS 'LONG (CADDR Y))
		      (CONS 'TYPE (CADDR Y)))
		'(DEFUN MACRO SHORT (X) 
		    (SUBST (CDR X) 
			   'INDEXLIST 
			   '(ARRAYCALL TYPE LONG . INDEXLIST)))))
    Now we might use ABBA to produce the macro for BE, but note that 
    the form of the macro is slightly different - the main body of the
    macro output appears to be a dotted-list rather than a standard 
    list.  This is so that arrays of varying numbers of dimensions may
    have their abbreviations defined by the same super-macro.
      (ABBA BO BARODD FIXNUM)
    expands into
      (DEFUN MACRO BO (X) 
	  (SUBST (CDR X) 
		  'INDEXLIST 
		  '(ARRAYCALL FIXNUM BARODD . INDEXLIST)))
    which then causes the appropriate macro definition for BO.  As 
    you would expect, then, (BO J) expands into 
	(ARRYACALL FIXNUM BARODD J)
    But consider the two-dimensional hash array HASH defined as 
	(SETQ HASH (ARRAY NIL T 37 37))
    Then (ABBA HA HASH T) defines HA so that (HA 3 (+ N 2)) expands 
    into (ARRAYCALL T HASH 3 (+ N 2))

 
    Guy Steele has accumulated a file of sophisticated macros and 
    macro-defining macros, and the interested may consult with him
    about them.


7) In order to get maximal speed from open-compiled array references,
   you may inform NCOMPLR of the actual ranges of the array 
   indices.  Thus a two-dimensional array of FIXNUMS, size 3 by 4, 
   could be declared by:
	(ARRAY* (FIXNUM (CIR 3 4)))
   Even partial information will be useful;  a NIL or ? in index 
   positions will indicate that no information is available about that 
   particular dimension.  For example, to add to the above declaration
   that for a two-dimensional array in which only the column dimension
   is known in advance, one could say:
	(ARRAY* (FIXNUM (CORL ? 4) (CIR 3 4)))
   The previous syntax for ARRAY* is still available, and one 
   should note that the following two forms both convey the same 
   information:
	(ARRAY* (NOTYPE DXA 1 CIR 2))
	(ARRAY* (NOTYPE (DXA NIL) (CIR ? ?)))

   Also, NCOMPLR now uses its own private obarray when compiling a 
   file, in addition to its own private readtable; they are contained,
   respectively, in the two global variables COBARRAY and CREADTABLE.
   If you have the practice of escaping to top-level LISP, and 
   loading in some of your own functions, be sure to do this stuff 
   under the correct obarray and readtable.  E.G., you might do
	((LAMBDA (OBARRAY READTABLE)
		 (FASLOAD MY FUNS DSK LOSER))
	    COBARRAY CREADTABLE)
TUESDAY  APRIL 23,1974   NM+2D.8H.36M.6S.    LISP 810    - GLS -

BRIEF SYNOPSIS:
[1] NEW FUNCTION: GETCHARN
[2] ALARMCLOCK AND TTY INTERRUPTS ARE RUN WITH (NOINTERRUPT T)
[3] NEW ARRAY SCHEME
[4] NEW FUNCTIONS: SUBRCALL, LSUBRCALL, ARRAYCALL
[5] UUO'S CHANGED: LER2,LER4 GONE; LER3 MOVED; ACALL,AJCALL NEW
[6] HH$X SLIGHTLY IMPROVED
----------------------------------------------------------------
[1] NEW FUNCTION: GETCHARN IS LIKE GETCHAR, BUT RETURNS A
    NUMBER INSTEAD OF A SINGLE CHARACTER OBJECT.  IT IS
    TO GETCHAR AS EXPLODEN IS TO EXPLODEC, AND IS SIMILAR IN ACTION 
    TO (LAMBDA (X) (CAR (EXPLODEN X))).  EXAMPLES:
	(GETCHARN 'FOOBAR 1) => 106	;OCTAL
	(GETCHARN 'FOOBAR 4) => 102
	(GETCHARN 'FOOBAR -1) => 0
	(GETCHARN 'FOOBAR 77) => 0

[2] WHEN AN ALARMCLOCK OR TTY INTERRUPT HAPPENS, THE NOINTERRUPT 
    FLAG IS SAVED, (NOINTERRUPT T) IS PERFORMED, THE USER'S SERVICE 
    FUNCTION IS EXECUTED, AND THE NOINTERRUPT FLAG IS RESTORED AFTER 
    EXECUTION.  [THE FLAG MIGHT CONCEIVABLY BE ON IF (IOC <X>) WERE 
    USED TO INITIATE THE INTERRUPT - NOINTERRUPT ONLY LOCKS OUT 
    REAL-TIME EVENTS.]  THUS, AN ALARMCLOCK HANDLER, FOR EXAMPLE, 
    WONT BE ABORTED BY A RANDOM ↑G BEFORE IT HAS HAD A CHANCE TO 
    RESTART THE CLOCK.

[3] THE NEW ARRAY SCHEME IS WORKING WELL NOW FROM THE INTERPRETER
    SIDE; THE NCOMPLR WILL KNOW ABOUT IT WHEN THE NEXT VERSION
    IS AVAILABLE, AND COMPLR WILL FOLLOW SUIT SHORTLY THEREAFTER.
    THE LISP NEW-ARRAY SCHEME COMPRISES MANY CHANGES TO THE 
    ARRAY PACKAGE, MOST OF WHICH ARE EXTENSIONS;  THERE
    ARE FEW INCOMPATIBILITIES. THE MOST IMPORTANT EXTENSION IS
    THE ADDITION OF TWO NEW TYPES OF ARRAYS: FIXNUM AND FLONUM.
    THESE TYPES OF ARRAYS STORE THEIR ELEMENTS AS 36-BIT WORDS
    RATHER THAN AS 18-BIT POINTERS, THUS SAVING SPACE AND TIME.
    SHORTLY, BOTH COMPLR AND NCOMPLR WILL PRODUCE CODE FOR ARRAYS 
    THAT WILL OPEN-ACCESS BOTH STANDARD AND FULLWORD ARRAYS ALMOST 
    AS FAST AS FORTRAN-COMPILED CODE DOES.
        ONE SOMEWHAT DRASTIC CHANGE: NSTORE WILL GO AWAY, SINCE 
    FIXNUM ARRAYS CAN BE USED WHERE AN ARRAY OF NUMBERS IS DESIRED. 
    FUNCTIONS SUCH AS LOADARRAYS AND DISGORGE WILL BE MODIFIED TO 
    USE FIXNUM ARRAYS RATHER THAN S-EXPRESSION-WITHOUT-GC-PROTECTION 
    ARRAYS.  IT IS POSSIBLE THAT SOMETIME IN THE FUTURE THERE MAY BE 
    OTHER VERSIONS OF THE FIXNUM-ARRAY IDEA, IN WHICH THE USER 
    SPECIFIES THE NUMBER OF BITS FOR EACH ENTRY;  THUS AN ARRAY 
    OF 1-BIT BYTES COULD EFFECT A SAVINGS OF A FACTOR OF 36.  BUT 
    THIS IS ONLY A POSSIBILITY FOR THE FUTURE.  OTHER CHANGES AND 
    EXTENSIONS ARE DESCRIBED BELOW ON A FUNCTION-BY-FUNCTION BASIS:

(*ARRAY <ARRAY> <TYPE> <DIM1> ... <DIMN>)	;LSUBR (2 . 7)

    CREATES AN N-DIMENSIONAL ARRAY. <TYPE> SPECIFIES THE TYPE
    OF THE ARRAY TO BE CREATED:

		T		S-EXPRESSION (AS BEFORE)
		NIL		S-EXPRESSION (BUT NO GC PROTECTION)
		FIXNUM		CONTAINS FIXNUMS AS 36-BIT WORDS
		FLONUM		CONTAINS FLONUMS AS 36-BIT WORDS
		OBARRAY		OBARRAY
		READTABLE	READTABLE

    IF <ARRAY> IS NIL, THEN AN ARRAY OF THE SPECIFIED TYPE,
    DIMENSIONALITY, AND SIZE IS CREATED, AND A FRESH ARRAY
    POINTER IS CONSED UP AND RETURNED; THE LATTER IS AN
    OBJECT WHICH POINTS TO THE BODY OF THE ARRAY.
    TYPEP OF SUCH AN OBJECT RETURNS "ARRAY". SUCH OBJECTS
    ARE ALSO THE RESULT OF SAYING (GET 'FOO 'ARRAY), AND
    ARE THE VALUE OF ATOMIC SYMBOLS LIKE OBARRAY AND READTABLE.
    ARRAY POINTERS MAY BE GIVEN TO APPLY AND FUNCALL; THUS
    (READTABLE 10) IS THE 10'TH ENTRY OF THE INITIAL READTABLE,
    THAT IS, OF THE ARRAY UNDER READTABLE'S ARRAY PROPERTY; BUT
    (FUNCALL READTABLE 10) IS THE 10'TH ENTRY OF THE CURRENT
    READTABLE, THAT IS, THE ARRAY POINTER WHICH IS THE VALUE
    OF THE VARIABLE "READTABLE". IN GENERAL, ARRAY POINTERS
    MAY BE USED IN ALMOST ANY PLACE (ALMOST!) THAT AN ATOMIC
    SYMBOL WITH AN ARRAY PROPERTY MAY BE USED. THERE IS A PLACE
    WHERE ARRAY POINTERS MUST BE USED IN PREFERENCE TO ATOMIC
    SYMBOLS WITH ARRAY PROPERTIES: SEE THE NEW "ARRAYCALL"
    FUNCTION BELOW. IN GENERAL, THE USER CANNOT MANIPULATE
    ARRAYS DIRECTLY, BUT ONLY THROUGH ARRAY POINTERS; THIS
    IS BECAUSE ARRAYS MAY BE RELOCATED WITHOUT WARNING BY
    THE GARBAGE COLLECTOR. FURTHERMORE, NO TWO NON-EQ ARRAY 
    POINTERS CAN EVER POINT TO THE SAME ARRAY.
    IF <ARRAY> IS NON-NIL, THEN IT MUST BE EITHER AN ARRAY
    POINTER OR AN ATOMIC SYMBOL. IF IT IS A SYMBOL, AND THE
    SYMBOL HAS NO ARRAY PROPERTY, IT IS GIVEN ONE (A FRESH
    ARRAY POINTER IS CONSED UP FOR THIS PURPOSE). IF <ARRAY>
    IS AN ARRAY POINTER, OR A SYMBOL WITH AN ARRAY PROPERTY,
    THEN ANY ARRAY CURRENTLY POINTED TO BY THAT POINTER IS
    KILLED. IN ANY CASE THE ARRAY POINTER IS THEN MADE TO
    POINT TO THE NEWLY CREATED ARRAY.
    AN ARRAY MAY BE UP TO FIVE-DIMENSIONAL (FORMERLY ONLY FOUR
    DIMENSIONS WERE ALLOWED). IF <DIMX> IS SPECIFIED AS JX,
    THEN THE X'TH SUBSCRIPT VARIES FROM 0 TO JX-1, AS BEFORE.
    AN ARRAY IS EFFECTIVELY A FUNCTION; THUS IF FOO HAS AN
    ARRAY PROPERTY, THEN (FOO 1 3) RETURNS ELEMENT [1,3] OF THE
    ARRAY FOO (WHICH BETTER BE TWO-DIMENSIONAL!)
    WHEN A NEW ARRAY IS CREATED, ITS ENTRIES ARE INITIALIZED TO
    NIL FOR ARRAYS OF TYPE "T" OR "NIL", TO 0 FOR FIXNUM ARRAYS,
    OR TO 0.0 FOR FLONUM ARRAYS. TO INITIALIZE AN ARRAY TO OTHER
    VALUES, SEE THE FUNCTIONS *REARRAY, BLTARRAY, AND FILLARRAY
    BELOW.
    IF <TYPE> IS OBARRAY OR READTABLE, THEN THE EXTRA ARGUMENTS
    HAVE A SLIGHTLY DIFFERENT SIGNIFICANCE. ONLY TWO OR THREE
    ARGUMENTS IN ALL MAY BE GIVEN; THE THIRD, IF PRESENT, TELLS
    HOW TO INITIALIZE THE OBARRAY OR READTABLE.
    FOR AN OBARRAY, A THIRD ARGUMENT OF NIL MEANS THAT THE NEW
    OBARRAY SHOULD BE LEFT COMPLETELY EMPTY. A THIRD ARGUMENT
    OF T MEANS THAT THE NEW ARGUMENT SHOULD BE INITIALIZED FROM
    THE CURRENT OBARRAY (THAT IS, FROM WHATEVER ARRAY POINTER IS
    THE CURRENT VALUE OF THE VARIABLE "OBARRAY"). ANY OTHER
    THIRD ARGUMENT MUST BE AN ARRAY OF TYPE OBARRAY FROM WHICH
    TO INITIALIZE THE NEW OBARRAY. OMITTING THE THIRD ARGUMENT
    IS THE SAME AS SAYING T. NOTE THAT WHEN ONE OBARRAY IS
    INITIALIZED FROM ANOTHER, THE BUCKETS ARE COPIED, BUT
    THE ATOMIC SYMBOLS ARE NOT COPIED.
    FOR A READTABLE, A THIRD ARGUMENT OF NIL MEANS THAT THE NEW
    READTABLE SHOULD BE INITIALIZED FROM THE CURRENT READTABLE.
    A THIRD ARGUMENT OF T MEANS TO INITIALIZE FROM THE SYSTEM'S
    INITIAL READTABLE. ANY OTHER THIRD ARGUMENT MUST BE A
    READTABLE TO INITIALIZE FROM. (IT MAKES NO SENSE TO HAVE AN
    "EMPTY" READTABLE AS IT DOES FOR AN OBARRAY). OMITTING THE
    THIRD ARGUMENT IS THE SAME AS SAYING NIL.

    EXAMPLES:
	(*ARRAY 'FOO 'FIXNUM 3 4 5)	;FOO GETS AN ARRAY
					; PROPERTY FOR A
					; 3X4X5 ARRAY OF FIXNUMS
	(*ARRAY NIL T 4 4)		;RETURNS ARRAY POINTER
					; FOR A 4X4 ARRAY OF
					; ARBITRARY S-EXPRESSIONS
	(*ARRAY 'QUUX 'READTABLE)	;QUUX IS GIVEN AN ARRAY
					; PROPERTY FOR A
					; READTABLE, INITIALIZED
					; FROM CURRENT ONE

(ARRAY <<ARRAY> <TYPE> <DIM1> ... <DIMN>)		;FSUBR

    ARRAY IS THE SAME AS *ARRAY, EXCEPT THAT THE FIRST TWO
    ARGUMENTS ARE NOT EVALUATED. THUS THE EXAMPLES ABOVE COULD
    HAVE BEEN WRITTEN:
	(ARRAY FOO FIXNUM 3 4 5)
	(ARRAY NIL T 4 4)
	(ARRAY QUUX READTABLE)

(STORE <ARRAY CALL> <VALUE>)			;FSUBR

    THIS WORKS AS BEFORE: IT STORES THE GIVEN VALUE IN THE
    SPECIFIED ARRAY ELEMENT. IF <ARRAY CALL> IS A CALL TO
    A FIXNUM OR FLONUM ARRAY, THEN <VALUE> SHOULD BE A FIXNUM
    OR FLONUM, RESPECTIVELY. RECALL THAT STORE EVALUATES ITS
    SECOND ARGUMENT BEFORE THE FIRST ARGUMENT; THUS
	(SETQ J 3)
	(STORE (FOOARRAY (SETQ J 5)) J)
    WILL STORE 3, NOT 5, IN ELEMENT 5 OF FOOARRAY. ONE SHOULD AVOID
    DEPENDING ON THIS FACT, HOWEVER, IN THE INTERESTS OF CLARITY.
    SEE ALSO THE DESCRIPTION OF THE NEW "ARRAYCALL" FUNCTION BELOW.

(ARRAYDIMS <ARRAY>)				;SUBR 1

    THIS FUNCTION WORKS AS BEFORE, BUT CAN RETURN A BROADER
    RANGE OF VALUES. IT RETURNS A LIST, SUCH THAT THE CAR
    OF THE LIST IS THE TYPE OF THE ARRAY (I.E., T, NIL,
    FIXNUM, FLONUM, OBARRAY, OR READTABLE), AND THE CDR IS
    A LIST OF ARRAY DIMENSIONS. THUS:
	(ARRAY QUUX FIXNUM 3 4 5)
	(ARRAYDIMS 'QUUX) => (FIXNUM 3 4 5)
	(ARRAYDIMS (GET 'QUUX 'ARRAY)) => (FIXNUM 3 4 5)
	(ARRAY ZORCH OBARRAY)
	(ARRAYDIMS 'ZORCH) => (OBARRAY 777)
    WHERE 777 HAPPENS TO BE THE SIZE OF AN OBARRAY ON THIS
    GIVEN LISP SYSTEM (THIS VARIES FROM ONE LISP TO ANOTHER).
    NOTE THAT ARRAYDIMS RETURNS SLIGHTLY DIFFERENT VALUES FOR
    READTABLES AND OBARRAYS THAN IT USED TO.

(*REARRAY <ARRAY> <TYPE> <DIM1> ... <DIMN>)	;LSUBR (1 . 7)

    THIS FUNCTION WORKS PRETTY MUCH AS BEFORE.
    IF IT IS GIVEN ONLY ONE ARGUMENT (*REARRAY FOO), THEN FOO
    MAY BE AN ARRAY POINTER OR AN ATOMIC SYMBOL. IF IT IS AN
    ATOMIC SYMBOL WITH NO ARRAY PROPERTY, IT MERELY RETURNS.
    OTHERWISE IT KILLS THE ARRAY POINTED TO BY THE ARRAY POINTER
    (THE ONE GIVEN, OR THE ONE OBTAINED FROM THE SYMBOL'S
    PROPERTY LIST). THE ARRAY POINTER IS NOW "DEAD", AND CANNOT
    BE USED AS A FUNCTION UNLESS AND UNTIL IT IS GIVEN A NEW
    ARRAY TO POINT TO.
    IF MORE THAN ONE ARGUMENT IS GIVEN TO *REARRAY, THEN THEY
    SHOULD BE ARGUMENTS SIMILAR TO THOSE FOR *ARRAY, EXCEPT THAT
    THE FIRST ARGUMENT MUST ALREADY BE A LIVE ARRAY, EITHER AS
    AN ARRAY POINTER OR AS A SYMBOL WITH A LIVE ARRAY PROPERTY.
    *REARRAY EFFECTIVELY CREATES A NEW ARRAY OF THE SPECIFIED
    DIMENSIONS AND BLTARRAY'S DATA FROM THE GIVEN ARRAY INTO THE
    NEW, THEN ALTERS THE ARRAY POINTER TO POINT TO THE NEW ARRAY.
    *REARRAY WILL NOT PERMIT YOU TO ALTER THE TYPE OF THE ARRAY
    AT PRESENT - YOU MUST SPECIFY THE CORRECT TYPE. IT IS RATHER
    MEANINGLESS TO USE *REARRAY OF MORE THAN ONE ARGUMENT ON A
    READTABLE OR OBARRAY.

(BLTARRAY <FROMARRAY> <TOARRAY>)		;SUBR 2

    BLTARRAY, AS BEFORE, COPIES THE DATA IN <FROMARRAY> INTO
    <TOARRAY>. IF <FROMARRAY> IS SHORTER, THEN EXTRA DATA IN
    <TOARRAY> IS UNHARMED, MORE OR LESS. IF <TOARRAY> IS
    SHORTER, THEN AS MUCH DATA AS WILL FIT IS COPIED.
    BLTARRAY INSISTS ON GETTING TWO ARRAYS OF THE SAME TYPE;
    IT WILL NOT COPY A FIXNUM ARRAY INTO A FLONUM ARRAY, AN
    S-EXPRESSION ARRAY, OR A READTABLE.
    IF ONE OBARRAY IS COPIED INTO ANOTHER, THE BUCKETS ARE
    COPIED AS WELL, AS IF FOR *ARRAY.

(LISTARRAY <ARRAY>)				;SUBR 1

    LISTARRAY NOW WORKS ON ARRAYS OF ALL TYPES AND ALL
    DIMENSIONS. IT RETURNS A LIST OF ALL THE DATA IN THE
    GIVEN ARRAY. IF A MULTI-DIMENSIONAL ARRAY IS GIVEN,
    THE DATA IS TAKEN IN ROW-MAJOR ORDER; FOR EXAMPLE:
	(ARRAY FOO FIXNUM 2 2)
	(LISTARRAY 'FOO)
    RETURNS FOO[0,0] FOO[0,1] FOO[1,0] FOO[1,1] AS A LIST
    IN THAT ORDER.

(FILLARRAY <ARRAY> <LIST>)			;SUBR 2

    FILLARRAY IS AN INVERSE TO LISTARRAY, EXCEPT THAT IT
    IS NOT PERMITTED TO USE FILLARRAY ON READTABLES OR
    OBARRAYS. IT DISTRIBUTES THE GIVEN LIST OF ITEMS
    INTO THE GIVEN ARRAY IN ROW-MAJOR ORDER. IF A FIXNUM
    OR FLONUM ARRAY IS SUPPLIED, THEN THE ELEMENTS OF THE
    LIST MUST ALL BE FIXNUMS OR FLONUMS, RESPECTIVELY.
    IF THERE ARE TOO MANY ITEMS IN THE LIST, THE EXTRA ONES
    ARE IGNORED; IF THERE ARE NOT ENOUGH, THEN THE LAST ONE
    IS USED TO FILL OUT THE ARRAY. THUS
	(FILLARRAY 'FOO '(43 11 27))	;RANDOM NUMBERS
    FILLS FOO, AS DEFINED ABOVE, SUCH THAT
	FOO[0,0] = 43
	FOO[0,1] = 11
	FOO[1,0] = 27
	FOO[1,1] = 27

(MAKOBLIST <ARG>)				;SUBR 1

    THIS FUNCTION WORKS AS BEFORE. NOTE THE FOLLOWING
    EQUIVALENCES IN THE NEW ARRAY SCHEME:
	(MAKOBLIST NIL)  <=>  (LISTARRAY OBARRAY)
	(MAKOBLIST X)    <=>  (*ARRAY X 'OBARRAY)
    FOR X NOT NIL.

(MAKREADTABLE <ARG>)				;SUBR 1

    THIS FUNCTION WORKS AS BEFORE. NOTE THE FOLLOWING
    EQUIVALENCES IN THE NEW ARRAY SCHEME:
	(MAKREADTABLE NIL)  <=>  (*ARRAY (GENSYM) 'READTABLE)
	(MAKREADTABLE T)    <=>  (*ARRAY (GENSYM) 'READTABLE T)
	(MAKREADTABLE X)    <=>  (*ARRAY X 'READTABLE)
    FOR X NOT NIL OR T.

(ARRAYCALL <TYPE> <APTR> <ARG1> ... <ARGN>)		;LSUBR (2 . 6)

    [SEE ALSO ITEM [4] BELOW.]
    ARRAYCALL IS SIMILAR TO FUNCALL, BUT INSISTS THAT ITS SECOND
    ARGUMENT BE AN ARRAY POINTER (AN ATOMIC SYMBOL WITH AN ARRAY
    PROPERTY IS NOT ACCEPTABLE IN THIS CONTEXT!) ITS FIRST ARGUMENT
    SHOULD MATCH THE TYPE INFORMATION OF THE ARRAY - EITHER FIXNUM,
    FLONUM, NIL, OR T.

    ITS PRIME VIRTUE IS THAT IT PERMITS THE COMPILER TO OPEN-CODE
    ACCESS TO VARIABLE ARRAYS. ONE MAY ALSO WRITE
	(STORE (ARRAYCALL TYPE VAR X1 ... XN) VAL)
    AND HAVE IT COMPILE EFFICIENTLY. EXAMPLE OF USE:
	(DEFUN TRANSPOSE (A)
	       (PROG (ARY TYP)
		     (COND ((EQ (SETQ TYP (TYPEP A)) 'ARRAY)
			    (SETQ ARY A))
			   ((AND (EQ TYP 'SYMBOL)
				 (SETQ ARY (GET A 'ARRAY))))
			   (T (RETURN
				 (TRANSPOSE
				    (ERROR 'NON-ARRAY/ -/ TRANSPOSE
					   A 'WRNG-TYPE-ARG)))))
		     (OR (AND (= (LENGTH (SETQ TYP
					       (ARRAYDIMS ARY)))
				 3)
			      (= (CADR TYP) (CADDR TYP)))
			 (RETURN
			    (TRANSPOSE
			       (ERROR 'NOT/ 2-DIM/ SQUARE/ -/ TRANSPOSE
				      A 'WRNG-TYPE-ARG))))
		     (DO ((N) (I 1 (1+ I)))
			 ((= I (CADR TYP)))
			(DO ((J 1 (1+ J)))
			    ((= J I))
			   (SETQ N (ARRAYCALL (CAR TYP) ARY I J))
			   (STORE (ARRAYCALL (CAR TYP) ARY I J)
				  (ARRAYCALL (CAR TYP) ARY J I))
			   (STORE (ARRAYCALL (CAR TYP) ARY J I) N)))
		     (RETURN A)))
    ANOTHER VARIATION WOULD BE TO LIMIT TRANSPOSE TO FIXNUM ARRAYS.
    THE EACH OF THE FOUR USAGES OF ARRAYCALL WOULD BE LIKE 
    (ARRAYCALL 'FIXNUM ARY . . .),  AND THE NCOMPLR WOULD BE ABLE 
    TO MAKE OPEN-CODED REFERENCES TO THE ARRAY.

PRIN1, PRINC, EXPLODEC, ETC.

    THE PRINT FUNCTIONS AND OTHER RELATED FUNCTIONS PRINT ARRAY
    POINTERS IN THE FOLLOWING MANNER: IF THE ARRAY POINTER IS
    DEAD (POINTS TO NO LIVE ARRAY), IT PRINTS AS "#DEAD-ARRAY".
    OTHERWISE IT PRINTS AS "#", THE TYPE OF ARRAY, "-", THE
    DIMENSIONS OF THE ARRAY SEPARATED BY ":" IN THE CURRENT
    RADIX, "-", AND THE ADDRESS OF THE ARRAY POINTER IN OCTAL.
    THUS PRINTING AN ARRAY POINTER LETS YOU SEE THE SAME
    INFORMATION RETURNED BY ARRAYDIMS. EXAMPLES:
USER:	(ARRAY NIL OBARRAY)
LISP:	#OBARRAY-777-103426
U:	(ARRAY NIL FIXNUM 4 5 6)
L:	#FIXNUM-4:5:6-103424
U:	(ARRAY FOO T 3 5 2 4 3)
L:	FOO
U:	(GET 'FOO 'ARRAY)
L:	#T-3:5:2:4:3-102362

[4] THREE NEW FUNCTIONS: SUBRCALL, LSUBRCALL, ARRAYCALL.
    (ARRAYCALL IS ALSO THORUGHLY DESCRIBED IN ITEM [3].)
    THESE ARE ANALOGOUS TO FUNCALL, IN THAT THEY TAKE
    A "FUNCTION" SPECIFICATION AS THE FIRST ARGUMENT AND
    AND ARGUMENTS FOR THAT FUNCTION AS THE REST OF THE
    ARGUMENTS. THE DIFFERENCE IS THAT THE SECOND ARGUMENT
    TO <FOO>CALL (FOR <FOO> AMONG [SUBR, LSUBR, ARRAY])
    SHOULD BE THE KIND OF ITEM YOU WOULD OBTAIN BY SAYING
    (GET 'QUUX '<FOO>) FOR SOME ATOMIC SYMBOL QUUX.
    THUS:
	(SUBRCALL NIL (GET 'CAR 'SUBR) '(A . B)) => A
    YOU USE THESE AT YOUR OWN RISK, OF COURSE; THE INTERPRETER
    CAN'T CHECK EVERYTHING. SOON THE COMPILER WILL OPEN-CODE
    THESE GUYS SUPER-EFFICIENTLY.
    HERE IS AN INTERESTING HACK:

	(SETQ SUBRDISPATCH (ARRAY NIL T 40))	;40=RANDOM SIZE

	(DO ((I 0 (1+ I))
	     (X '(CAR CDR CADR REVERSE EXPLODE ...) (CDR X)))
	    ((NULL X))
	    (STORE (ARRAYCALL T SUBRDISPATCH I)
		   (GET (CAR X) 'SUBR)))

	(SUBRCALL NIL (ARRAYCALL T SUBRDISPATCH 3) '(A B C)) => (C B A)

	(SUBRCALL NIL (ARRAYCALL T SUBRDISPATCH 1) '(A B C)) => B

    AND SO FORTH AND SO ON. THAT IS, YOU CAN HAVE AN ARRAY
    OF DISPATCH ADDRESSES. AGAIN, BE CAREFUL!

[5] FOR MACHINE LANGUAGE HACKERS ONLY:
    PDP-10 LISP'S UUO'S HAVE BEEN REARRANGED. LER2 AND LER4
    HAVE BEEN FLUSHED. LER3'S OPCODE HAS BEEN ALTERED.
    TWO NEW UUO'S: ACALL AND AJCALL. THE EFFECTIVE ADDRESS
    OF ACALL MUST AN ARRAY POINTER, WHICH SHOULD HAVE ITS
    COMPILED-CODE-NEEDS-ME BIT TURNED ON. ACALL SERVES
    AS AN NCALL TO AN ARRAY (ONE CAN'T INCREMENT THE
    EFFECTIVE ADDRESS OF AN NCALL TO AN ARRAY BECAUSE IT
    IS INDIRECT). THE UUO HANDLER THUS SMASHES NCALL'S TO
    ARRAYS TO BE ACALL'S INSTEAD OF PUSHJ'S, AND SIMILARLY
    NJCALL'S TO BE AJCALL'S. IN MOST PRACTICAL CASES THIS
    WILL NOT BE NECESSARY, SINCE THE COMPILER HOPEFULLY
    CAN OPEN-CODE MOST ARRAY ACCESSES ANYWAY.
    THE GETMIDASOP FUNCTION HAS BEEN UPDATED TO REFLECT
    THESE ALTERED OP-CODES.

[6] HH$X TRIES NOT TO SIGNAL A ↑H INTERRUPT IF IT THINKS THAT THE
    INTERRUPT WILL BE STACKED IN THE INTERRUPT QUEUE RATHER THAN
    RUN IMMEDIATELY. IT WILL SIMPLY RETURN TO DDT IN THIS CASE.
FRIDAY  MARCH 01,1974   FQ+18H.38M.31S.   LISP 767   - GLS -

[1] NEGATIVE RUNTIMES
[2] ERRFRAME CHANGE
[3] FUNCALL PUSHES APPLY FRAMES
[4] NEW FUNCTION: NRECONC
[5] PRINT, PRIN1, PRINC CHECK I/O FLAGS - AFFECTS ABBREVIATION
[6] (STATUS UREAD) IS NOW CONSISTENT ABOUT LINKS
[7] SOME CHANGES TO ARRAY STUFF (PREPARING FOR NEW ARRAYS)
	[7A] TYPEP MAY RETURN ARRAY
	[7B] BIBOP SAR SPACE NOW CALLED ARRAY SPACE
	[7C] IN BOTH LISPS, ALLOC SAYS "ARRAY="
[8] REVIEW OF P.$X AND FRIENDS
----------------------------------------------------------------
[1] IT HAS BEEN OBSERVED THAT OCCASIONALLY RUNTIMES WILL BE
    MEASURED AS BEING NEGATIVE. THIS IS APPARENTLY AN ITS BUG
    HAVING SOMETHING TO DO WITH REQUESTING CORE MANAGEMENT,
    SO IT HAPPENS MORE IN BIBOP LISP THAN IN NON-BIBOP. I'VE
    TAKEN SOME COMPENSATIVE ACTIONS, BUT BE FOREWARNED AND BEWARE.

[2] CHANGE TO ERRFRAMES: FOR COMPATIBILITY WITH EVALFRAMES,
    ERRFRAMES ARE NOW OF THE FORM

	(ERR  <PDL POINTER>  <ERROR MESSAGE>  <A-LIST>)

    I.E. THE ATOM "ERR" IS NOW CONSED ON THE FRONT, JUST
    AS "EVAL" OR "APPLY" IS CONSED ONTO AN EVALFRAME.

[3] SPEAKING OF EVALFRAMES: FUNCALL CREATES SUCH A FRAME
    OF THE APPLY VARIETY THESE DAYS.

[4] (NRECONC X Y)  <=>  (NCONC (NREVERSE X) Y)
    BUT IS FASTER, BECAUSE IT DOESN'T HAVE TO SCAN BACK
    DOWN THE LIST JUST NREVERSED TO DO THE NCONC.

[5] PRINT, PRIN1, AND PRINC CHECK ALL THEOUTPUT FLAGS
    (↑W, ↑R, ↑B, ↑N) BEFORE COMMENCING PRINTOUT.
    IF THE FLAGS ALL INDICATE NO OUTPUT, THEY RETURN
    IMMEDIATELY, THUS SAVING MUCH TIME.
    FURTHERMORE, IF OUTPUT IS GOING TO THE TTY AND
    NOWHERE ELSE, AND YOU ARE USING PRINLEVEL AND PRINLENGTH
    TO GET ABBREVIATED FORMS OUTPUT, THEN ONLY THE
    ABBREVIATED FORMS ARE GENERATED. THIS MEANS THAT
    TYPING ↑R IN THE MIDDLE OF SUCH A PRINTOUT MAY
    CAUSE A FILE TO RECEIVE (THE TAIL END OF) AN
    ABBREVIATED FORM, EVEN IF (STATUS ABBREVIATE)
    REQUESTS OTHERWISE. ON THE OTHER HAND, THIS HACK
    PREVENTS CERTAIN SCREWS INVOLVING CIRCULAR LISTS.

[6] IF  DSK:LOSER;FOO BAR  IS A LINK TO  DSK:CLOD;ZORCH QUUX
    AND YOU DO (UREAD FOO BAR DSK LOSER), THEN (STATUS UREAD)
    WILL RETURN (ZORCH QUUX DSK CLOD) AND NOT
    (ZORCH QUUX DSK LOSER) AS IT USED TO.

[7] SOME NEW STUFF HAS BEEN INSTALLED IN THIS LISP
    IN ANTICIPATION OF THE NEW FAST ARRAY SCHEME.
    A NEW KIND OF SPACE HAS BEEN IMPLEMENTED IN
    NON-BIBOP LISP, ANALOGOUS TO BIBOP LISP'S
    FORMER "SAR" SPACE, WHICH HOLDS OBJECTS CALLED
    ARRAY POINTERS.

	[7A] SUCH OBJECTS ARE OF TYPE "ARRAY". TYPEP
	     WILL RETURN "ARRAY" FOR SUCH AN OBJECT.

	[7B] BIBOP'S SAR SPACE IS NOW CALLED ARRAY SPACE,
	     FOR INDEED THEY ARE THE SAME OBJECTS.
	     THUS YOU MUST NOW SAY (ALLOC '(ARRAY 300))
	     INSTEAD OF (ALLOC '(SAR 300)), ETC.

	[7C] THE INITIAL ALLOC WILL ASK YOU "ARRAY=".
	     ARRAY POINTERS ARE TWO WORDS, SO IF YOU SAY
	     100., YOU HAVE ALLOCATED ROOM FOR 50. ARRAY
	     POINTERS.

    OTHERWISE ALL THE ARRAY STUFF SHOULD WORK THE SAME AS
    BEFORE; BUT WATCH FOR THE NEW ARRAY SCHEME!

[8] FOR PEOPLE WHO USE DDT TO DEBUG LISP CODE (I.E.
    SUPER-HACKERS), HERE IS A REVIEW OF P.$X AND FRIENDS:

    P.$X AND RELATED GOODIES ARE NAMED INSTRUCTIONS WHICH
    YOU CAN EXECUTE FROM DDT WITH THE $X COMMAND WHICH DO
    ALL KINDS OF NICE THINGS FOR YOU. THEY AVOID CLOBBERING
    ANYTHING WITHIN THE LISP, E.G. THEY SAVE AND RESTORE
    ANY ACCUMULATORS AND/OR TEMPORARIES THEY USE,
    AND ARE CIRCUMSPECT ABOUT I/O SWITCHES.

    REFERENCES TO "THE LEFT HALF OF ." OR "THE RIGHT HALF
    OF ." MEANS THAT THE LEFT OR RIGHT HALF OF DDT'S
    CURRENTLY OPEN LOCATION IS UNDER CONSIDERATION. $=ALTMODE.

	P.$X	ASSUMES THE RIGHT HALF OF . TO BE AN
		S-EXPRESION, AND PRINTS IT.
	PL.$X	PRINTS THE LEFT HALF OF . AS AN S-EXPRESSION.
	PP Z$X	WHERE Z IS SOME QUANTITY, PRINTS THAT QUANTITY
		AS IF IT WERE A POINTER, AS AN S-EXPRESSION.
		(PP IS A UUO, AND Z IS ITS EFFECTIVE ADDRESS.
		SINCE PP IS A UUO, A FEW TEMPORARIES USED BY THE
		UUO HANDLER GET CLOBBERED; THUS BEWARE OF USING
		IT IF YOU MAY HAVE BROKEN OUT OF THE UUO
		HANDLER TO DDT.)
	VC.$X	ASSUMES THAT THE RIGHT HALF OF . POINTS TO
		A VALUE CELL, AND RUNS OVER THE OBARRAY TRYING
		TO FIND AN ATOM WITH THAT VALUE CELL. PRINTS
		THE ATOM IF IT FINDS ONE, OTHERWISE PRINTS ?.
	VCL.$X	ASSUMES LEFT HALF OF . POINTS TO A VALUE CELL,
		AND BEHAVES LIKE VC.$X. NOTE THAT THIS IS
		PARTICULARLY GOOD FOR EXAMINING SPECIAL PDL
		ENTRIES, WHICH HAVE VALUE CELL POINTERS IN THE
		LEFT HALF, AND OLD VALUES ON THE RIGHT HALF.
	SB.$X	ASSUMES THAT THE RIGHT HALF OF . POINTS
		SOMEWHERE INTO THE MIDDLE OF A SUBR, AND RUNS
		OVER THE OBARRAY TRYING TO FIND THE NAME OF THE
		SUBR. IF THE NAME CAN BE FOUND, IT IS PRINTED.
		THIS IS ESPECIALLY GOOD FOR REGULAR PDL ENTRIES
		CREATED BY PUSHJ, BECAUSE THEY CONTAIN A SUBR
		RETURN ADDRESS IN THE RIGHT HALF.
	HH$X	CREATE A FAKE ↑H BREAKPOINT IN LISP.
		THIS SAVES THE ENVIRONMENT THE WAY ANY USER
		INTERRUPT DOES AND LETS YOU INVESTIGATE A
		LITTLE. THIS IS GOOD WHEN YOU CAN'T AFFORD
		TO PROCEED THE LISP EVEN LONG ENOUGH TO TYPE
		↑H AT IT. WHEN YOU TYPE $P AT LISP, YOU WILL
		SEE A *. YOU ARE IN DDT! (YES, $P GETS YOU BACK
		TO DDT, NOT BACK FROM IT, HERE!)
		NOTE THAT IF YOU WENT BACK TO DDT WHILE LISP
		HAD USER INTERRUPTS LOCKED OUT (E.G. IN THE
		MIDDLE OF A GARBAGE COLLECTION), THEN THE
		↑H BREAK CAN'T BE RUN; YOU WILL RETURN TO DDT
		IMMEDIATELY.
	DP$X	DEPURIFIES THE PAGE CONTAINING .. THIS WAS
		INVENTED BEFORE DDT DID IT FOR YOU.
	RP$X	REPURIFIES THE PAGE CONTAINING .. THIS IS
		SOMEWHAT MORE USEFUL, E.G. TO REPURIFY A PAGE
		AFTER PATCHING IT.
	PURIFY$G	THIS PURIFIES THE SYSTEM PAGES OF LISP
		WHICH MAY BE PURE. FOR BIBOP LISP, IT ALSO
		PURIFIES THOSE PAGES OF USER CODE WHICH HAVE
		BEEN MARKED AS PURIFIABLE. IT TENDS TO
		DESTROY ACCUMULATORS; YOU CAN'T PROCEED AFTER
		DOING IT. (IT IS GENERALLY PERFORMED PRIOR
		TO DUMPING OUT A LISP, E.G. JUST AFTER A
		CALL TO THE FUNCTION MACDMP.)

	THE REST OF THESE ARE AVAILABLE ONLY IN BIBOP LISP.

	T.$X	IS LIKE P.$X, BUT INSTEAD OF PRINTING THE
		RIGHT HALF OF . AS AN S-EXPRESSION, IT GETS
		TYPEP INFORMATION FOR IT FROM THE BIBOP
		TYPE TABLE, AND PRINTS THE TYPE INFORMATION.
	TL.$X	LIKE T.$X, BUT LOOKS AT THE LEFT HALF OF ..
	TP Z$X	LIKE PP Z$X, ONLY DOES T. INSTEAD OF P..
	TBLPUR$X	PRINTS OUT BIBOP'S PURTBL DATA BASE,
		ONE DIGIT FOR EVERY PAGE IN THE 256K ADDRESS
		SPACE. THE DIGITS ARE 0 = NONEXISTENT MEMORY,
		1 = IMPURE MEMORY, 2 = PURE MEMORY,
		3 = MEMORY IN AN UNCERTAIN STATE, E.G. PDL
		AREAS AND THE END OF BINARY PROGRAM SPACE.
		AT THE END SUMMARIES ARE PRINTED.
		THIS IS NOT THE ACTUAL STATE OF MEMORY, BUT
		ONLY WHAT BIBOP WOULD LIKE IT TO BE,
		E.G. A PAGE MARKED 2 MAY NOT REALLY BE PURE.
		PURIFY$X IN BIBOP EFFECTIVELY FORCES THE ACTUAL
		STATE OF THE WORLD TO CONFORM TO THE PURTBL.
	PAGPUR$X	PRINTS OUT A TABLE LIKE TBLPUR, BUT
		DISPLAYS THE ACTUAL STATE OF EACH PAGE,
		NONEXISTENT, IMPURE, OR PURE.
	
WEDNESDAY  FEB 13,1974   FM+7D.3H.28M.38S.   LISP 746   - GLS -

AS OF VERSION 746, LISP SYSTEMS OF THE SAME VERSION WILL SHARE
PAGES AMONG THEMSELVES; I.E. A LISP, MACSYMA, AND CONNIVER CAN
ALL SHARE PAGES COMMON TO THE LISP SYSTEM.
BIBOP LISP HAS BEEN GREATLY RESTRUCTURED; I WILL RE-EDIT THE BIBOP
DOCUMENT AS SOON AS I CAN (SAY WITHIN THE NEXT WEEK). -- GLS

BRIEF SYNOPSIS:

[1] LOSSES DUE TO FAILURE TO GET CORE NOW LEAVE YOU IN DDT
[2] NEW FUNCTION: IMPLODE
[3] FASLOAD, UREAD, UFILE OF ONE ARG
[4] USE :PDUMP FOR BIBOP LISP SYSTEMS, NEVER $Y
[5] ALTMODE LETS INIT FILE LOOK AT JCL
[6] (STATUS STATUS ...), (STATUS SSTATUS ...), (STATUS FEATURE ...)
[7] NEW *PURE HACK USING VALUE OF THE SYMBOL "PUTPROP"
[8] *PURE CAUSES ALL SYMBOL BLOCKS CREATED TO BE PURE
[9] ARGS OF NIL DOES NOTHING, RETURNS NIL
[10] (PRINC '/↑P) DOES NOT OUTPUT CTRL/P, BUT UPARROW-P
----------------------------------------------------------------
[1] THE LOAD ON THE PDP-10'S HAS INCREASED GREATLY OF LATE.
    BECAUSE OF THIS, LISP MORE OFTEN FAILS TO GET MORE CORE
    WHEN IT NEEDS TO.  FORMERLY THIS USED TO PRODUCE VARIOUS
    KINDS OF UNCORRECTABLE LISP ERRORS, SUCH AS "NO CORE - FASLOAD".
    (THIS WAS REASONABLE BECAUSE IT HAPPENED SO SELDOM.)
    NOW, UNDER SUCH HEAVY LOADS, IT IS NOT REASONABLE TO LOSE
    PERMANENTLY JUST BECAUSE THE SYSTEM IS LOADED. THEREFORE
    WHEN LISP FAILS TO GET CORE, IT SHOULD NOW PRINT THE MESSAGE

	:$ CAN'T GET CORE! YOU ARE IN DDT - TYPE $P TO TRY AGAIN $

    OR WORDS TO THAT EFFECT. WHEN THIS HAPPENS, YOU ARE INDEED IN
    DDT; YOU MAY FLUSH THE LISP AND LOG OUT, THEREBY BECOMING A HERO
    FOR LIGHTENING THE SYSTEM LOAD, OR YOU CAN PROCEED THE LISP,
    WHICH WILL TRY AGAIN TO GET THE NECESSARY CORE.

[2] NEW FUNCTION: IMPLODE, A SUBR OF ONE ARGUMENT, IS EQUIVALENT
    TO INTERN OF MAKNAM, I.E. (IMPLODE X) <==> (INTERN (MAKNAM X)).
    THE DIFFERENCE IS THAT IMPLODE IS MUCH MORE EFFICIENT
    (AVOIDS MUCH UNNECESSARY CONSING).

[3] UREAD, UFILE, AND FASLOAD NOW ACCEPT A SINGLE ARGUMENT;
    UREAD AND UFILE ASSUME THAT THE MISSING SECOND FILE NAME IS ">",
    WHILE FASLOAD ASSUMES THAT THE SECOND FILE NAME IS "FASL".
    IN THE INTERESTS OF SAFETY, UKILL STILL REQUIRES BOTH NAMES.

[4] BECAUSE OF LOSSAGE ON ITS' PART, COMBINED WITH THE MEMORY
    MANAGEMENT STRATEGIES OF BIBOP LISP, ONE SHOULD NEVER,
    NEVER, NEVER USE $Y TO DUMP OUT A BIBOP LISP ONCE
    SOMETHING HAS BEEN LOADED INTO IT, SUCH AS A CONNIVER OR
    ACTOR SYSTEM. ALWAYS BUT ALWAYS, USE :PDUMP
    INSTEAD, EVEN IF YOU HAVEN'T PURIFIED THE BIBOP LISP.

[5] IF THE JOB COMMAND LINE TO A FRESH LISP CONTAINS AN ALTMODE,
    THEN THE PART BEFORE THE ALTMODE IS USED AS THE INIT FILE
    NAME, AND THE PART AFTER IS IGNORED. FURTHERMORE THE JCL
    IS NOT FLUSHED; THUS THE INIT FILE CAN USE (STATUS JCL)
    TO LOOK AT THE PART AFTER THE ALTMODE. IF THERE IS
    NOTHING BEFORE THE ALTMODE, THEN LISP JUST SAYS "ALLOC?";
    BUT THE JCL HAS NOT BEEN FLUSHED AND CAN BE EXAMINED
    AS BEFORE. THUS IF YOU SAY TO DDT

	:LISP FOO;BAR QUUX$HACK

    THEN THE INIT FILE NAMED "FOO;BAR QUUX" IS USED, AND (STATUS JCL)
    WOULD RETURN THE LIST

	(F O O /; B A R /  Q U U X $ H A C K)

[6] THREE NEW STATUS FEATURES:
	[A] (STATUS STATUS FOO) RETURNS T IFF "FOO" IS A VALID
	    STATUS OPTION. THUS (STATUS STATUS UNAME)
	    WOULD RETURN T, WHILE (STATUS STATUS ZORCH) WOULD
	    RETURN NIL. IF "FOO" IS NOT PRESENT (I.E., YOU SAY
	    (STATUS STATUS)), THEN A LIST OF VALID STATUS OPTIONS
	    IS RETURNED (THE NAMES WILL BE TRUNCATED TO 5 CHARACTERS,
	    HOWEVER, AND TO SOME OTHER NUMBER OF CHARACTERS ON
	    OTHER IMPLEMENTATION).
	[B] (STATUS SSTATUS FOO) IS SIMILAR TO THE ABOVE,
	    BUT RETURNS T IFF "FOO" IS A VALID SSTATUS OPTION.
	    NOTE THAT ALL VALID SSTATUS OPTIONS ARE VALID STATUS
	    OPTIONS, BUT NOT ALL VALID STATUS OPTIONS ARE VALID
	    SSTATUS OPTIONS. (STATUS SSTATUS) RETURNS A LIST
	    OF (TRUNCATED) NAMES OF VALID SSTATUS OPTIONS.
	[C] (STATUS FEATURE FOO) IS ESSENTIALLY THE SAME AS
	    (NOT (NULL (MEMQ 'FOO (STATUS FEATURES))))
	    AND IS FOR CONVENIENCE' SAKE.

[7] *PURE, WHICH IS THE MAGIC VARIABLE CONTROLLING VARIOUS PURIFICATION
    HACKS IN BIBOP LISP, HAS AN EFFECT ON THE PUTPROP FUNCTION.
    THE VALUE OF THE VARIABLE PUTPROP SHOULD BE A LIST OF PROPERTY
    NAMES (IT IS INITIALLY (SUBR FSUBR LSUBR); PUTTING "ARRAY" ON THIS
    LIST IS A MAJOR DISASTER, SO DON'T DO IT!).  IF *PURE IS
    NON-NIL, THEN IF PUTPROP IS PUTTING ON A PROPERTY WHICH DIDN'T
    EXIST BEFORE, THEN INSTEAD OF PUTTING THE PROPERTY AT THE FRONT
    OF THE PROPERTY LIST, IT PUTS IT IN THE MIDDLE SOMEWHERE,
    AND PURIFIES BOTH THE PROPERTY VALUE AND THE TWO WORDS OF
    PROPERTY LIST IT CREATES. RECALL THAT *PURE IS FOR USE ONLY
    WHEN LOADING UP LARGE SYSTEMS TO BE DUMPED, LIKE MACSYMA. IF YOU
    AREN'T SURE OF ALL THIS, EITHER IGNORE IT OR ASK GLS OR JONL.

[8] ANOTHER *PURE HACK IS THAT IF ANY ATOMIC SYMBOLS ARE CREATED,
    AS MUCH AS POSSIBLE OF THE ATOMIC SYMBOL IS MADE PURE.
    THIS CAUSES SOME FUNNINESSES TO HAPPEN, SUCH THAT SOMETIMES
    IT MUST BE DEPURIFIED (I.E. COPIED). ANY QUESTIONS? SEE GLS.

[9] IF THE FIRST ARGUMENT TO ARGS IS NIL, IT DOES NOTHING AT ALL
    EXCEPT RETURN NIL. (RECALL THAT NIL IS NOT A VALID
    FUNCTION ANYWAY).

[10] TO PREVENT THOSE NASTY I/O SCREWS, TYO AND RELATED FUNCTIONS
     LIKE PRINT WILL NOT OUTPUT CTRL/P'S - RATHER IT OUTPUTS THEM
     AS AN UPARROW AND A P (THIS AFFECTS ONLY THE TTY - CTRL/P'S
     CAN STILL BE SENT TO FILES). TO DO CURSOR CONTROL, FOR
     ANY CHARACTER X, DO (CURSORPOS 'X) INSTEAD OF (PRINC '/↑PX).
     EXAMPLE: TO CLEAR THE SCREEN, USE (CURSORPOS 'C).
WEDNESDAY  DEC 26,1973    NM+2D.6H.21M.49S.    LISP 707    - GLS -
		
BRIEF SYNOPSIS:
[1] "APPLY FRAMES" ARE PUSHED BY APPLY AND UUO HANDLER
[2] NEW VARIABLE IN BLISP: *PURE CONTROLS PURE FREE STORAGE
[3] RPLACA/RPLACD NOW DO SOME ARGUMENT CHECKING
[4] IN BLISP, GC-OVERFLOW IS WHAT USED TO BE GC-LOSSAGE (MAX)
[5] (STATUS NEWLINE) RETURNS ASCII VALUE OF NEWLINE CHARACTER
[6] LISP NOW KNOWS ABOUT (INIT) DIRECTORY; STANDARD INIT FILES
[7] GETCOR SUBROUTINE TO ALLOCATE CORE FOR HAND-CODED LAP USERS
----------------------------------------------------------------
[1] THERE ARE NOW TWO VARIETIES OF EVALFRAMES: ONE IS THE USUAL
    EVAL FRAME, AND THE OTHER IS CALLED AN "APPLY FRAME".
    THE FORMER IS PUSHED BY ENTRIES TO EVAL, THE LATTER BY
    ENTRIES TO APPLY. ALSO, THE UUO HANDLER WILL NOW PUSH ONE
    OR THE OTHER KIND OF FRAME IF IT CAN (USUALLY AN APPLY
    FRAME); THUS COMPILED CODE CALLS CAN BE BETTER DEBUGGED WITH
    BAKTRACE AND EVALFRAME ALSO (PROVIDING *RSET AND NOUUO ARE
    BOTH ON, OF COURSE).
    THE DIFFERENCE BETWEEN AN EVAL FRAME AND AN APPLY FRAME IS
    THAT AN EVAL FRAME CONTAINS A FORM, WHILE AN APPLY FRAME
    CONTAINS A FUNCTION AND A LIST OF (PRESUMABLY ALREADY
    EVALUATED) ARGUMENTS. THE EVALFRAME FUNCTION HAS BEEN
    ALTERED ACCORDINGLY; IT NOW RETURNS A 4-LIST INSTEAD OF
    A 3-LIST. THE CAR OF THIS LIST IS ONE OF THE SYMBOLS
    "EVAL" OR "APPLY"; THE CADR IS THE FRAME POINTER (THE
    CAR OF THE OLD 3-LIST); THE CADDR IS A FORM FOR AN EVAL
    FRAME (AS BEFORE), BUT FOR AN APPLY FRAME IS A 2-LIST OF
    THE FUNCTION AND THE LIST OF ARGUMENTS; AND THE CADDDR IS
    THE A-LIST POINTER (THE CADDR OF THE OLD 3-LIST).
	EXAMPLE: IF AN EVAL FRAME WERE CREATED FOR (FOO 'A 'B)
	    THEN EVALFRAME WOULD RETURN
		(EVAL <FRAME PTR> (FOO (QUOTE A) (QUOTE B))
			<A-LIST PTR)
		    BUT IF AN APPLY FRAME WERE CREATED (SAY BY THE
	    UUO HANDLER), THEN EVALFRAME WOULD RETURN
		(APPLY <FRAME PTR> (FOO (A B)) <A-LIST PTR>)
    NOTE THAT IN EITHER CASE CAADDR OF THE 4-LIST GIVES YOU
    THE FUNCTION THAT WAS INVOKED.
    OF COURSE, ALL THIS STUFF HAPPENS ONLY IN *RSET MODE, AND
    FOR THE UUO STUFF TO WORK NOUUO SHOULD BE NON-NIL ALSO.

[2] IN BLISP, THE CONTROL OF AUTOMATIC USE OF PUR FREE STORAGE
    HAS BEEN TRANSFERRED FROM THE VARIABLE "PURE" TO THE
    VARIABLE "*PURE". "PURE", AS BEFORE, STILL CONTROLS THE
    PURE CODE GENERATION AND XCT PAGES HACKERY SUPPORTED BY
    FASLOAD. *PURE SHOULD BE NON-NIL ONLY WHEN LOADING UP A
    SYSTEM TO BE SUBSEQUENTLY :PDUMP'ED; IT CAUSES CERTAIN
    KINDS OF THINGS TO BE PLACED IN PURE FREE STORAGE SO THAT
    THEY WILL BE SHARED IN THE NEW SYSTEM. AMONG THE THINGS THAT
    WILL BE AUTOMATICALLY PURIFIED:
	CONSTANT LIST STRUCTURE USED BY COMPILED CODE
	PNAMES OF ALL INTERNED ATOMIC SYMBOLS
    VARIOUS OTHER THINGS MAY OR MAY NOT BE PURIFIED; I AM STILL
    EXPERIMENTING WITH THIS HACK. HOWEVER, ITS ACTIONS WILL
    ALWAYS BE CONSISTENT WITH THE IDEA OF LOADING UP AND
    :PDUMP'ING A LARGE SYSTEM (E.G. MACSYMA). AGAIN, THE CORRECT
    USE IS:
	(SETQ *PURE T)		;MAYBE ALSO SETQ PURE
	--- LOAD UP SYSTEM ---
	(SETQ *PURE NIL)	;HOWEVER, NEEDN'T CHANGE PURE
	(MACDMP ':PDUMP/ <WHEREVER>/
)

[3] RPLACA, WHEN CALLED INTERPRETIVELY, OBJECTS TO CLOBBERING
    ANYTHING BUT AN IMPURE LIST CELL. RPLACD OBJECTS TO
    CLOBBERING ANYTHING BUT AN IMPURE LIST CELL OR AN ATOMIC
    SYMBOL. (RECALL THAT THESE ARE OPEN-CODED BY COMPLR.)

[4] THE GC-LOSSAGE INTERRUPT NOW RECEIVES NOT A LIST, BUT
    ONLY THE NAME OF A SPACE (AS NON-BIBOP USED TO, AND NOW
    DOES AGAIN). THIS CORRESPONDS TO WHAT FORMERLY WAS
    INDICATED BY (<SPACE> MIN). THE MAX CASE IS NOW FIELDED
    BY A NEW USER INTERRUPT (NUMBER 13.) CALLED GC-OVERFLOW.
    THIS IS NOT AN ERROR BREAK INTERRUPT, THOUGH THE DEFAULT
    HANDLER DOES DO A ;BKPT GC-OVERFLOW. INSTEAD, IT IS MORE
    AKIN TO THE GC-DAEMON, THE DIFFERENCE BEING THAT GC-DAEMON
    RUNS AFTER EVERY GC, WHILE GC-OVERFLOW RUNS ONLY WHEN
    A GCMAX PARAMETER HAS BEEN EXCEEDED. .INFO.;BIBOP (MEMO)
    REFLECTS THESE CHANGES, IN EFFECT AS OF BIBOP LISP 696.
    NOTE THE GREAT SIMILARITY OF GC-OVERFLOW TO PDL-OVERFLOW;
    IN PARTICULAR, SINCE GC-OVERFLOW IS NOT AN ERROR BREAK,
    SAYING $P DOES NOT ERROR OUT TO TOP LEVEL, BUT RATHER
    CONTINUES THE COMPUTATION. YOU MUST USE ↑G OR SOMETHING
    TO QUIT. NOTE THAT IF YOU SAY (SETQ GC-OVERFLOW NIL)
    YOU WILL NEVER SEE ANYTHING WHEN A GCMAX IS EXCEEDED,
    AND GC WON'T COMPLAIN; HOWEVER, MEMORY WILL BE EXPANDED
    IN AN INCREDIBLY INEFFICIENT MANNER. THE FILE
    ML:GLS;BIBOP GCOVER CONTAINS A SAMPLE GC-OVERFLOW HANDLER
    (A REWORKED COPY OF THE OLD GC-LOSSAGE EXAMPLE).
    NOTE THAT ALL THIS SHOULD CORRECT THE PROBLEM OF GC-LOSSAGE
    INSIDE AN ERRSET.

[5] (STATUS NEWLINE) RETURNS 13. IN PDP-10 LISP, BUT 10. ON
    MULTICS; THAT IS, IT RETURNS THE ASCII VALUE OF THE NEWLINE
    CHARACTER FOR WHATEVER SYSTEM YOU'RE ON. THIS SHOULD RELIEVE
    SOME INCOMPATIBILITIES.

[6] LISP WILL NOW USE THE (INIT) DIRECTORY TO FIND LISP INIT
    FILES. THERE ARE TWO CASES:
	[A] IF YOU GAVE THE LISP JCL, BUT LEFT THE SECOND FILE
	NAME TO BE (INIT), AND THE SPECIFIED FILE DOESN'T
	EXIST, THEN LISP PERMUTES  FOO;BAR (INIT)  TO BE
	(INIT);FOO BAR  AND LOOKS FOR THAT FILE. IF THIS
	FAILS, LISP GETS UNHAPPY AND REVERTS TO THE TTY.
	    EXAMPLE:
		    :LISP FOO;
		WOULD FIRST LOOK FOR  FOO;.LISP. (INIT),
		AND THEN FOR (INIT);FOO .LISP.
	NOTE THAT IF YOU GIVE TWO FILES NAMES FOR JCL, LISP
	WILL NOT LOOK AT THE (INIT) DIRECTORY, SINCE THE SECOND
	FILE NAME WILL NOT BE (INIT). THUS
		:LISP FOO BAR
	WOULD NOT LOOK AT THE (INIT) DIRECTORY IF  FOO BAR
	DIDN'T EXIST, BUT
		:LISP FOO;BAR
	WOULD (IT WOULD LOOK FOR  (INIT);FOO BAR, PROVIDED
	THAT  FOO;BAR (INIT)  DIDN'T EXIST).

	[B] IF YOU GAVE LISP NO JCL, BUT TYPE ↑Q OR ↑W AT
	THE ALLOC? QUESTION, THEN LISP LOOKS FIRST FOR
	<YOUR SNAME>;.LISP. (INIT), AND IF THAT FAILS, FOR
	(INIT);<YOUR SNAME> .LISP.

	FOR CONVENIENCE THERE ARE TWO FILES ON (INIT) CALLED
	"DOCTOR .LISP." AND "INDEX .LISP.". THUS TO GET A
	DOCTOR YOU NEED ONLY SAY TO DDT
		:LISP DOCTOR;
	AND TO GET AN INDEX (WITH CORE=60)
		:LISP INDEX;
	NOTE: THE SEMICOLONS ARE IMPORTANT!

[7] THERE IS A LITTLE ROUTINE INTERNAL TO LISP FOR THE BENEFIT
    OF HAND-CODED LAP LOSERS TO GOBBLE UP BLOCKS OF CORE. IT IS
    INVOKED AS FOLLOWS (NATURALLY, YOU SHOULD HAVE LISP SYMBOLS
    LOADED INTO DDT WHEN YOU LOAD UP THE LAP):
	(MOVEI TT <NPAGES>)	;NUMBER OF 1K PAGES DESIRED
	(PUSHJ P GETCOR)	;RESERVES A BLOCK OF CORE
	(JUMPE TT LOSE)		;RETURNS 0 IN TT IF LOST
	...			;ELSE TT HAS LOW ADDRESS OF BLOCK
    ACCUMULATOR TT SHOULD HAVE THE AMOUNT OF CORE DESIRED,
    MEASURED IN 1K PAGES. IF GETCOR WINS IT WILL RETURN THE
    LOW ADDRESS OF A CONTIGUOUS BLOCK OF THE SPECIFIED SIZE
    IN TT; OTHERWISE IT WILL RETURN 0 IN TT. GETCOR RESERVES THE
    RIGHT TO SMASH ANY ACCUMULATORS IT WANTS TO, SO BE CAREFUL!
    NOTE WELL: GETCOR MERELY RESERVES ADDRESS SPACE; IT DOES NOT
    ACTUALLY CAUSE THE CORE TO APPEAR. THUS IT IS UP TO THE
    CALLER TO DO *CBLK'S TO GET THE CORE, OR MAP IT INTO PDP-6
    OR PDP-11 MEMORY, OR WHATEVER. GETCOR MERELY CAUSES LISP TO
    PROMISE NOT TO USE THAT SECTION OF THE ADDRESS SPACE FOR
    ANY OTHER PURPOSE. SUCCESSIVE CALLS TO GETCOR WILL RETURN
    DISJOINT AND NOT NECESSARILY CONTIGUOUS BLOCKS OF CORE.
    THERE IS NO PROVISION FOR RETURNING A BLOCK OF CORE WHEN
    YOU'RE DONE WITH IT. THIS ROUTINE EXISTS IN BOTH NON-BIBOP
    AND BIBOP LISPS; THOSE PEOPLE WHO HAVE JUST BEEN GRABBING
    PAGES OF HIGH CORE IN NON-BIBOP LISP SHOULD CHANGE THEIR CODE
    TO USE GETCOR SO THAT IT WILL RUN IN BIBOP LISP.
	EXAMPLE:
		(MOVEI TT 10)
		(PUSHJ P GETCOR)	;GET CORE
		(JUMPE TT LOSE)		;LOSEY LOSEY
		(MOVEI D 10)		;SO MAP 8. PAGES
		(MOVE R (% 0 0 001777 600030))	;MAGIC NUMBER
		(MOVEI F 0 TT)		;F GETS LOW ADDRESS OF BLOCK
		(LSH F -12)		;NO, MAKE THAT THE PAGE #
	LOOP	(*CALL 0 11MAP)		;MAP A PAGE
		(*VALUE)
		(ADDI F 1)		;INCREMENT STUFF
		(ADD R (% 0 0 0 4))
		(SOJG D LOOP)
		...
	11MAP	(SETZ)			;MAGIC CALL TO MAP A PAGE
		(SIXBIT T11MP)
		(F)
		(SETZ 0 R)
    THIS EXAMPLE MAPS THE MEMORY OF THE PDP-11 DISPLAY INTO AN
    8K BLOCK OF MEMORY IN LISP SO THAT OTHER ROUTINES CAN MUNG
    THE DISPLAY, PRESUMABLY. THE ADDRESS OF THE LOW END OF THE
    8K BLOCK IS STILL IN ACCUMULATOR TT.
12/3/73  MONDAY DEC 03,1973	LISP 686	- GLS, JONL -

NOT-SO-BRIEF SYNOPSIS:

[0] TRY BLISP! (THIS IS, AT LONG LAST, THE FAMOUS "BIBOP LISP".)
    INFO ON BIBOP LISP IS AT THE *END* OF THIS LISP RECENT,
    AND ALSO ON .INFO.;BIBOP (MEMO). THE LATTER IS TJ6'D,
    SUITABLE FOR OUTPUTTING TO THE XGP OR LPT. IF YOU
    ARE DEEPLY CONCERNED WITH THE INNER WORKINGS OF LISP,
    E.G. YOU MAKE UP AND DUMP CONNIVERS OR MACSYMAS, SEE
    GLS OR JONL IN ROOM 834 FOR AN ILLUSTRATED BIBOP MEMO
    AND/OR A LONG-WINDED EXPLANATION.
[1] NUMBERP, FIXP, FLOATP, BIGP RETURN T OR NIL, NOT ARG
[2] CURSORPOS EXTENDED
[3] NEW FUNCTIONS:
	[3A] COPYSYMBOL
	[3B] SYSP
	[3C] ALLOC
[4] NOINTERRUPT NOW RETURNS OLD STATE
[5] NEW SWITCH FOR ARITHMETIC UNDERFLOW: ZUNDERFLOW
[6] GRIND0 AND SPRINTER NOW AUTOLOAD
[7] DISINI TAKES SECOND ARG TO USE GT40
[8] GCMIN HAS DISAPPEARED; NEW GC-LOSSAGE AND GC-DAEMON ARGS
[9] COMPLR HAS TWO READTABLES
----------------------------------------------------------------
[1] FOR VARIOUS REASONS HAVING TO DO WITH EFFICIENCY OF CODE
    PRODUCED BY THE NUMBER COMPILER (NCOMPLR), NUMBERP, FIXP,
    FLOATP, AND BIGP NOW ALWAYS RETURN T OR NIL, AND NEVER THEIR
    ARGUMENTS AS THEY USED TO.

[2] CURSORPOS HAS BEEN EXTENDED IN TWO WAYS:
	[2A] IN THE TWO-ARGUMENT FORM, AN ARGUMENT OF NIL MEANS
	     DON'T CHANGE THAT COORDINATE.
	[2B] CURSORPOS MAY BE CALLED WITH ONE ARGUMENT, WHICH
	     SHOULD BE EITHER A SINGLE-CHARACTER OBJECT (AN
	     ATOMIC SYMBOL, THE FIRST CHARACTER OF WHICH IS USED)
	     OR A FIXNUM BETWEEN 0 AND 177 SPECIFYING THE ASCII
	     VALUE OF A CHARACTER. A LIST OF VALID CHARACTERS
	     AND THEIR ACTIONS (HACKERS WILL NOTE THAT THESE
	     ARE CONTROL-P TTY CODES):
	     CHARACTER	    FUNCTION
		C		CLEAR SCREEN AND HOME UP
		F		MOVE CURSOR FORWARD NON-DESTRUCTIVELY
		B		MOVE CURSOR BACKWARD
		D		MOVE CURSOR DOWN (LINE FEED)
		U		MOVE CURSOR UP (LINE STARVE)
		]		KILL FROM CURSOR TO END OF LINE
		E		KILL FROM CURSOR TO END OF SCREEN
		T		HOME UP, DO NOT CLEAR SCREEN
		M,N		CONNECTED TO **MORE** FEATURE,
				NOT VERY WELL DEFINED. USE AT
				YOUR OWN RISK.
	     NOTE THAT R AND S ARE NOT PERMITTED, SINCE LISP
	     USES THOSE CODES FOR ITS ONW PURPOSES. IF
	     YOU FEED AN INVALID CHARACTER TO CURSORPOS, IT
	     WILL GIVE A CORRECTABLE WRNG-TYPE-ARG ERROR.

[3] THREE NEW FUNCTIONS: COPYSYMBOL, SYSP, AND ALLOC.

   [3A] COPYSYMBOL IS A SUBR OF TWO ARGUMENTS. THE FIRST MUST
	BE AN ATOMIC SYMBOL, AND THE SECOND IS A FLAG. IT
	RETURNS A COPY (NON-INTERNED!) OF THE ATOMIC SYMBOL.
	THIS COPY WILL HAVE THE SAME PRINT NAME AS THE OLD ONE.
	IF THE FLAG IS NIL, THE NEW SYMBOL WILL HAVE NO OTHER
	PROPERTIES OR VALUE. IF THE FLAG IS NON-NIL, IT WILL
	HAVE THE SAME PROPERTIES AS THE OLD ONE. NOTE THAT
	ALTHOUGH VALUES OF PROPERTIES WILL BE EQ, SECTIONS
	OF PROPERTY LIST WILL NOT; THUS PUTTING A PROPERTY
	ONTO THE OLD ATOM AFTERWARD WILL NOT AFFECT THE NEW
	ONE, AND VICE VERSA. IF THE OLD ATOM HAD A VALUE,
	THE NEW ONE WILL HAVE ITS OWN VALUE CELL, BUT THE
	SAME VALUE IN THAT VALUE CELL. ARGS PROPERTIES,
	SUBR PROPERTIES, ETC. WILL BE TRANSFERRED IN AN
	APPROPRIATE MANNER.
	THIS IS THE RECOMMENDED WAY TO CREATE NEW ATOMIC SYMBOLS
	(MAKNAM AND GENSYM ARE ALSO RECOMMENDED). THE OLD
	TECHNIQUE (THAT'S A POLITE TERM FOR A CROCK) OF
	SAYING (CONS (CAR NIL) (CDR <ATOM>)) DOES NOT WORK
	ON MULTICS AND WILL NOT WORK ON THE NEW PDP-10 BIBOP
	LISP, AND IS THEREFORE HIGHLY DISCOURAGED.

   [3B] SYSP IS A SUBR OF ONE ARGUMENT. IF ITS ARGUMENT IS A
	SUBR PROPERTY WHICH IS THAT OF SOME SYSTEM SUBR (AS
	OPPOSED TO A USER SUBR), OR AN ATOMIC SYMBOL WITH
	SUCH A PROPERTY, THEN SYSP RETURNS T, OTHERWISE NIL.
	THIS IS USED PRIMARILY BY COMPLR.
	EXAMPLES:   (SYSP 'CAR) => T
		    (SYSP 'FOO) => NIL
		    (SYSP 47) => NIL

   [3C] ALLOC IS A SUBR OF ONE ARGUMENT, WHICH CAN BE USED
	TO SET THE GCMIN PARAMETERS FOR VARIOUS SPACES. (NOTE
	THAT THE VARIABLE GCMIN HAS DISAPPEARED - SEE [8] BELOW.)
	IT TAKES A PAIRED LIST; THE FIRST ITEM OF EACH PAIR
	SHOULD BE THE NAME OF A SPACE (LIST, FIXNUM, OR FLONUM),
	AND THE SECOND SHOULD BE OF THE FORM (NIL NIL <FIXNUM>).
	THE FIXNUM IS USED TO SET THE GCMIN. THIS STRANGE FORMAT
	IS FOR COMPATIBLITY WITH BIBOP; SEE BELOW.
	EXAMPLE: TO SET THE GCMIN FOR LIST TO 333, AND FOR FLONUM
	TO 22, LEAVING THE FIXNUM GCMIN ALONE, SAY:
		(ALLOC '(LIST (NIL NIL 333) FLONUM (NIL NIL 22)))
	TO EXAMINE THE GCMINS, SAY (ALLOC T) AND YOU WILL
	GET BACK A LIST SUITABLE FOR USE AS AN ARGUMENT TO ALLOC,
	CONTAINING THE CURRENT STATES OF THE GCMINS.

[4] THE NOINTERRUPT FUNCTION DESCRIBED IN THE LAST LISP RECENT
    HAS BEEN ALTERED SO THAT IT ALWAYS RETURNS THE PREVIOUS
    STATE OF THE SWITCH, RATHER THAN ITS ARGUMENT. THUS ONE
    MAY "PUSH" AND "POP" THE STATE OF THIS SWITCH.

[5] MOST OF THE FLONUM ARITHMETIC FUNCTIONS GIVE AN ERROR
    "ARITHMETIC UNDERFLOW" IF UNDERFLOW OCCURS DURING SOME
    COMPUTATION. SETTING THE VARIABLE ZUNDERFLOW TO NON-NIL
    CAUSES 0 TO BE RETURNED INSTEAD WHEN UNDERFLOW OCCURS.
    IN PARTICULAR
	((LAMBDA (ZUNDERFLOW)
		 (LIST (TIMES 1.0E-20 1.0E-20)
		       (*$ 1.0E-20 1.0E-20)
		       (EXPT 1.0E-20 2)))
	 T)
    WILL RETURN (0.0 0.0 0.0). NOTE THAT UNDERFLOW DETECTION
    WILL NOT OCCUR IN NUMERICAL CODE OPEN-CODED BY NCOMPLR;
    ONLY CLOSED (OR INTERPRETED) CALLS TO LISP SYSTEM SUBRS
    WILL DETECT THIS.

[6] SPRINTER AND GRIND0 NOW AUTOLOAD.
    SPRINTER IS MERELY A "PRETTY-PRINT" FUNCTION FOR RANDOM FORMS; 
    IT IS ESSENTIALLY WHAT GRINDEF CALLS WHEN IT IS "PRETTY-PRINTING"
    A FUNCTION DEFINITION.

[7] DISINI MAY NOW TAKE A SECOND ARGUMENT, WHICH SPECIFIES
    THAT A GT40 IS TO BE USED INSTEAD OF THE 340. THIS
    ARGUMENT SHOULD BE AN ATOMIC SYMBOL WHOSE PRINT NAME IS
    THE GT40'S TTY NUMBER. EXAMPLE: (DISINI 0 'T34)
    CURRENTLY, T34 IS THE ONLY GT40 AVAILABLE.

[8] THE VARIABLE GCMIN NO LONGER EXISTS. TO ALTER GCMIN PARAMETERS,
    USE THE FUNCTION ALLOC, DESCRIBED ABOVE.
    THE FORMAT OF THE ARGUMENT TO THE GC-LOSSAGE FUNCTION HAS
    BEEN ALTERED FOR COMPATIBILITY WITH BIBOP. IT USED TO BE
    THE NAME OF THE LOSING SPACE (LIST, FIXNUM, OR FLONUM).
    NOW IT IS A LIST OF THE SPACE NAME AND THE ATOM "MIN";
    THUS IF LIST SPACE OVERFLOWED, THE GC-LOSSAGE FUNCTION
    WOULD GET THE ARGUMENT (LIST MIN).
    THE FORMAT OF THE GC-DAEMON'S ARGUMENT HAS ALSO BEEN ALTERED:
    WHERE THE ARGUMENT USED TO BE OF THE FORM
	(<BEFORE> . <AFTER>),
    IT IS NOW OF THE FORM
	(<SPACE NAME> <BEFORE> . <AFTER>).
    THUS A TYPICAL GC-DAEMON ARGUMENT MIGHT BE
	((LIST 200 . 473) (FIXNUM 0 . 375) (FLONUM 457 . 472)).

[9] THE COMPILER NOW HAS TWO READTABLES. THE FIRST IS THE
    STANDARD INITIAL READTABLE, THE OTHER IS THE VALUE OF
    THE VARIABLE CREADTABLE. THE VARIABLE READTABLE IS LAMBDA-BOUND 
    TO THE VALUE OF CREADTABLE WHEN COMPILATION BEGINS.  THIS 
    READTABLE WILL THUS BE IN EFFECT DURING EXECUTION OF DECLARES, 
    ETC. SO THAT FUNNY MACRO CHARACTERS DEFINED IN THE FILE WILL GO 
    INTO THE SECOND READTABLE. THUS THESE CHARACTERS WILL NOT BE 
    SEEN IF YOU DO A ↑G QUIT.  IF YOUR FILE NEEDS CERTAIN MACRO 
    CHARACTER DEFINITIONS IN ORDER TO BE READABLE, THERE ARE TWO WAYS
    TO GET THESE DEFINITIONS INTO CREADTABLE:
	1) BY DECLARE, E.G. 
		(DECLARE (SETSYNTAX '/: 'SPLICING '(LAMBDA NIL NIL)))
	   OR EVEN
		(DECLARE (EVAL (READ)))
		(SETSYNTAX '/: 'SPLICING '(LAMBDA NIL NIL))
	2) BY EXPLICITLY BINDING READTABLE TO CREADTABLE, E.G.
		((LAMBDA (READTABLE) (FASLOAD MAC CHARS)) CREADTABLE)


[0] HERE FOLLOWS SOME INFORMATION ON BIBOP LISP:

The (in)famous "Bibop" (pronounced "bee-bop") LISP scheme is
now available.  Bibop means "BIg Bag Of Pages", a reference
to the method of memory management used to take advantage of
the memory paging features of ITS.  The average LISP user
should not be greatly affected in converting to this new
LISP (which very eventually will become the standard LISP,
say in two or three months).
Much effort has been expended to keep Bibop and non-Bibop
LISPs compatible.  In particular, if LISP code written for
non-Bibop LISP also works "as is" in Bibop LISP, then so
will the corresponding LAP and FASL files;  that is, the
compiler output is completely compatible (and will be kept
so).   Unless you must alter source code for Bibop LISP,
there is no need to recompile.  

$$$$$ [1] $$$$$ Atomic Symbols Are Different $$$$$

Atomic symbols in Bibop LISP are very different from those
in non-Bibop LISP.  The PNAME, ARGS, and VALUE "properties"
are not stored on the property list, but in a secret hidden
place.   The ARGS property can be examined and altered with
the function ARGS as in non-Bibop LISP, the VALUE property
with EVAL, SET, SETQ, and BOUNDP, and the PNAME property
with EXPLODE, GETCHAR, etc.

The car of an atomic symbol is not -1 (#777777) in Bibop
LISP.   The cdr of an atomic symbol is still the property
list, however;  using RPLACD on an atom, though hackish,
also works as before.  EXPR and SUBR properties are kept on
the property list as in non-Bibop LISP. 

Note well:  (CONS (CAR NIL) <property-list>) is most
definitely not a good way to construct a new atomic symbol
(in Bibop, the result won't be an atom at all, but a dotted
pair or whatever).  If it is necessary to create a new
atomic symbol in this manner, use the function COPYSYMBOL,
which works as described in LISP ARCHIV in both Bibop and
non-Bibop LISPs.


$$$$$ [2] $$$$$ The Allocator Is Different $$$$$

When a Bibop LISP starts up, it says:

	BIBOP LISP <version number>
	ALLOC?

All the usual responses have their usual effects;  ↑Q, ↑W,
space, Y, N, etc. work as in non-Bibop LISP.  Some questions
asked are different, however, and they are presented in a
different order.  Questions and their default values look
something like: 

	CORE = 66
	REGPDL = 10000
	SPECPDL = 4000
	FXPDL = 10000
	FLPDL = 2000
	LIST = 40000
	FIXNUM = 5000
	FLONUM = 2000
	BIGNUM = 400
	SYMBOL = 2000
	SAR = 400

The only parameters which are of real importance are the
various pdl allocations, which is why they come first;  the
others can be changed later (see below).  The four pdl
parameters are upper limits to the sizes (in PDP-10 words)
of the four push-down stacks in LISP.  Don't be afraid to
give large values for these allocations (or for others,
either) since you are not really given as much core as you
ask for, but only one page of core per pdl;  as the pdls
grow, more pages of core are added.  The other six
parameters control the maximum size for each of six "spaces"
used to contain various objects.  They are:

	LIST	lists and dotted pairs
	FIXNUM  fixnums (like FXS in non-Bibop LISP)
	FLONUM  flonums (like FLS in non-Bibop LISP)
	BIGNUM  bignums (actually, just the bignum headers,
		which hold the sign and point to the rest)
	SYMBOL  atomic symbols (this is why you can't use
		CONS to create symbols;  they are not in
		LIST space!)
	SAR	special array cells (seen primarily on
		property lists as values of ARRAY
		properties;   the allocation for these need
		not be large)

Again, you are not really given as much core as you ask for,
so don't be afraid to ask for lots;  you only get a little
core, and more is added when you need it.

As in non-Bibop LISP, if you type ↑Q or other magic
characters at the ALLOC? question, your .LISP. (INIT) file
will be read.  The first form should be a comment, as usual.
The names of the spaces should be the same as the names used
by ALLOC, given above.  Note that supplying nonexistent
space names in the comment doesn't hurt, so you can use the
same comment in non-Bibop LISPs as well as Bibop LISPs;
e.g. the comment

	(COMMENT FXS 4000 FIXNUM 5000 FLS 2000
		SYMBOL 4000 FLONUM 2000 BIGNUM 1400)

will for non-Bibop set the size for FXS=4000, FLS=2000 and
for Bibop will set FIXNUM=5000, FLONUM=2000, SYMBOL=4000,
BIGNUM=1400.


$$$$$ [3] $$$$$ The ALLOC Function $$$$$

The primary feature of Bibop is that it allows you to expand
memory dynamically.  It does this automatically to a certain
extent;  however, the user may explicitly alter the sizes of
memory spaces with the function ALLOC.  This is a subr whose
single argument should look like the comment form given in a
.LISP. (INIT) file.  Example:

	(ALLOC '(LIST 40000 FIXNUM 6000 SYMBOL 5000))

will dynamically re-allocate LIST space to be a maximum of
40000 words, etc.  At present Bibop can only expand memory,
not shrink it, so if you specify a size for a space smaller
than its current actual size, your request is ignored for
that space.  ALLOC returns T.

(The ALLOC function is actually considerably more
complicated, but the above description should suffice for
the purposes of most users.  An extended description of
ALLOC may be found in section II.[3].)


$$$$$ [4] $$$$$ A Few New Messages $$$$$

If you should run out of memory for any reason, you will see
a message similar to that in non-Bibop LISP, e.g.:

	(FIXNUM MAX) STORAGE CAPACITY EXCEEDED
	;BKPT GC-LOSSAGE

Now all is not lost at this point in a Bibop LISP;  you may
call the function ALLOC to make FIXNUM space bigger, then
say (RETURN '(T)) to continue the computation.  If you say
$P the computation is aborted.  If it says (FIXNUM MIN)
instead of (FIXNUM MAX), then you have lost badly;  just
type $P.  This should happen only rarely, however.

If you see a message that looks something like

	;ADDING A NEW FIXNUM SEGMENT - FIXNUM SPACE NOW 2000 WORDS

it merely means that the garbage collector has decided to
add more memory.  You will only see this if you have typed
↑D to see the garbage collector statistics (as in
non-Bibop).

Yet another message you may see (which also does not exist
in non-Bibop LISP) is:  

	;BKPT PDL-OVERFLOW

This means that you have used excessive amounts of pdl, and
therefore are probably stuck in infinite recursion or
something.   If you want to keep going, just say $P and
Bibop will try to extend the pdl if it can.  To abort the
computation, use ↑G.
MONDAY  OCT 15,1973	FM+4D.3H.22M.30S.	LISP 623	- GLS -

BRIEF SYNOPSIS:
[1] NEW FUNCTION GCD FOR "GREATEST COMMON DIVISOR"
[2] NEW DO FORMAT PERMITS PROGS WITH INITIAL SETTINGS FOR VARIABLES
[3] PRINLEVEL, PRINLENGTH, AND (STATUS ABBREVIATE)
[4] NOINTERRUPT - USER FEATURE TO LOCK OUT REAL-TIME INTERRUPTS
[5] (STATUS DOW) FOR DAY-OF-WEEK INFORMATION
[6] NEW COMPLR SWITCH: V
[7] SOME CHAGES:
	A) (STATUS XCTPG) AND (XCTBLT) SUPERSEDED BY
		(STATUS UUOLINKS) AND (SSTATUS UUOLINKS)
	B) REMOB IS NOW A SUBR
	C) SECOND ARG TO RECLAIM IS DIFFERENT
----------------------------------------------------------------
[1] THERE EXIST TWO FUNCTIONS TO TAKE THE GCD OF TWO NUMBERS.
    (GCD X Y) TAKES THE GCD OF X AND Y, WHICH MAY BE FIXNUMS
    OR BIGNUMS. (\\ X Y) IS SIMILAR, BUT X AND Y MAY ONLY BE
    FIXNUMS. THUS \\ IS TO GCD AS * IS TO TIMES, ETC. THIS
    SYMBOL IS EASILY REMEMBERED IF YOU REMEMBER THAT \ MEANS
    REMAINDER, AND GCD IS JUST A MOBY REMAINDER, SORT OF.
[2] THERE IS A THIRD FORMAT FOR DO NOW:
	(DO <VAR-SPECS> NIL
	     BODY...)
    THIS IS EXACTLY LIKE A NEW-STYLE DO (MULTIPLE INDICES)
    EXCEPT THAT THE PREDICATE/RETURN VALUE CLAUSE IS NIL.
    (NOT (NIL), BUT NIL!!!) THE MEANING OF THIS IS THAT
    THE VARIABLES SHOULD BE INITIALIZED AND THE BODY
    PERFORMED EXACTLY ONCE. NOTE THAT STEPPERS FOR THE VARIABLES
    ARE ILLEGAL IN THIS MODE, SINCE STEPPERS CAN NEVER BE
    EXECUTED. EXAMPLE:
	(DO ((A 0) (B 1)) NIL
	    (PRINT 'A=)
	    (PRIN1 A)
	    (PRINT 'B=)
	    (PRIN1 B))
    PRINTS THE FOLLOWING:
	A=0
	B=1
    AND THEN RETURNS NIL. IN THIS WAY ONE GETS THE EFFECT OF
    THE FAMOUS "PROG WITH INITIALIZED VARIABLES" FEATURE.
[3] THE MANY AND VARIOUS OUTPUT FUNCTIONS (PRINT, PRIN1,
    FLATSIZE, ETC.) ARE NOW CONTROLLED BY TWO GLOBAL VARIABLES
    AND A STATUS CALL. PRINLEVEL AND PRINLENGTH SHOULD ALWAYS
    BE EITHER NON-NEGATIVE FIXNUMS OR NIL. PRINLEVEL IS
    THE MAXIMUM NUMBER OF UNBALANCED OPEN PARENTHESES WHICH
    PRIN1, ETC. MAY OUTPUT; IF THE LIST STRUCTURE IS TOO
    "DEEP" TO BE ABLE TO DO THIS, THEN SUB-LISTS BELOW THE
    PRINLEVEL ARE ABBREVIATED BY #. E.G. SUPPOSE ONE TRIES
    TO PRINT THE LIST
	(FOO (BAR (LAMBDA (X Y) (QUUX BAZ))) (TEST))
    WITH PRINLEVEL=1. THEN IT WOULD ACTUALLY PRINT AS:
	(FOO # #)
    WITH PRINLEVEL=2, IT WOULD COME OUT AS:
	(FOO (BAR #) (TEST))
    AND WITH PRINLEVEL=3 IT WOULD PRINT AS:
	(FOO (BAR (LAMBDA # #)) (TEST))
    PRINLEVEL=NIL MEANS PRINLEVEL=INFINITY.
    PRINLENGTH IS TO THE CDR DIRECTION WHAT PRINLEVEL IS
    TO THE CAR DIRECTION. IF ANY LIST IS LONGER THAN
    SPECIFIED BY PRINLENGTH, THEN ANY EXTRA ITEMS ARE
    OMITTED AND ABBREVIATED AS ...  EXAMPLE: IF YOU
    TRY TO PRINT THE LIST
	(FOO (BAR (BAZ) (HERE (IS) A TEST)) WHAT ARE YOU)
    WITH PRINLENGTH=1 (AND PRINLEVEL=NIL) IT WOULD PRINT AS:
	(FOO ...)
    WITH PRINLENGTH=2, AS:
	(FOO (BAR (BAZ) ...) ...)
    AND WITH PRINLENGTH=3 AS:
	(FOO (BAR (BAZ) (HERE (IS) A ...)) WHAT ...)
    OF COURSE, ONE CAN USE PRINLEVEL AND PRINLENGTH BOTH AT THE
    SAME TIME. IF THE ABOVE LISTS WERE PRINTED WITH PRINLEVEL=2
    AND PRINLENGTH=2, THEY WOULD PRINT AS:
	(FOO (BAR #) ...)
	(FOO (BAR # ...) ...)
    WITH PRINLEVEL=3 AND PRINLENGTH=2, THEY WOULD PRINT AS:
	(FFOO (BAR (LAMBDA # ...)) ...)
	(FOO (BAR (BAZ) ...) ...)
    AND WITH PRINLEVEL=3 AND PRINLENGTH=3, THEY WOULD PRINT AS:
	(FOO (BAR (LAMBDA # #)) (TEST))
	(FOO (BAR (BAZ) (HERE # A ...)) WHAT ...)
    THE DEFAULT CONDITION FOR ALL THIS HACKERY IS THAT IT
    APPLIES ONLY TO TTY OUTPUT AND NO OTHER. THUS IF ONE
    IS OUTPUTTING TO BOTH DSK AND TTY, THE TTY OUTPUT WILL
    BE ABBREVIATED AS SPECIFIED BY PRINLEVEL AND PRINLENGTH,
    BUT OUTPUT TO THE FILE WILL NOT BE, NOR WILL THE
    RESULT OF EXPLODE AND FLATSIZE BE AFFECTED.
    THIS CAN BE ALTERED BY (SSTATUS ABBREVIATE <N>).
    IF THE 1 BIT OF N (A FIXNUM) IS ON, IT MEANS THAT OUTPUT
    TO FILES SHOULD BE ABBREVIATED; IF THE 2 BIT IS ON, IT
    MEANS THAT FLATSIZE AND EXPLODE SHOULD USE ABBREVIATIONS.
    THUS 0 => ONLY TTY, 1 => TTY AND FILES, 2 => TTY AND
    FLATSIZE, AND 3 => TTY, FILES, AND FLATSIZE.
    AS A HACK, (SSTATUS ABBREVIATE T) MEANS EVERYTHING GETS
    ABBREVIATED, AND (SSTATUS ABBREVIATE NIL) MEANS ONLY
    TTY GETS ABBREVIATED; THIS WILL CONTINUE TO BE TRUE EVEN
    IF MORE BITS OF (STATUS ABBREVIATE) ARE ASSIGNED MEANINGS.
    NOTE THAT, LIKE (STATUS TERPRI), (STATUS ←), AND
    (STATUS TTYREAD), (STATUS ABBREVIATE) RESIDES IN THE
    READTABLE; THUS ONE CAN ALTER IT (AND IN PARTICULAR
    LAMBDA-BIND IT) BY CHANGING READTABLES.
[4] USERS CAN CONTROL SOMEWHAT THE HAPPENING OF RANDOM "REAL
    TIME" INTERRUPTS WITH THE FUNCTION NOINTERRUPT OF ONE
    ARGUMENT. (NOINTERRUPT T) PUTS LISP IN A MODE WHEREBY
    ALL TTY AND ALARMCLOCK INTERRUPTS WILL BE DEFERRED
    (EVEN ↑G AND ↑X INTERRUPTS!!!) AND SAVED IN A FIFO
    QUEUE. (NOINTERRUPT NIL) RELEASES THIS MODE AND PROCESSES
    ANY INTERRUPTS WHICH WERE STACKED UP DURING THIS TIME,
    IF ANY. NOTE THAT IF WHILE IN (NOINTERRUPT T) MODE,
    YOU TYPE (SAY) ↑H ↑] ↑G ↑A ↑\  THEN THE ↑G WILL
    FLUSH THE ↑H AND ↑] INTERRUPTS FROM THE QUEUE; BUT
    WHEN (NOINTERRUPT NIL) IS DONE, THE ↑G QUIT WILL BE
    PERFORMED, FOLLOWED BY THE ↑A AND ↑\ INTERRUPTS.
    IN GENERAL, WHEN NOINTERRUPT MODE IS REALEASED,
    PENDING INTERRUPTS ARE PROCESSED IN THE ORDER
    (↑G, ↑X QUIT), (CLOCK INTERRUPTS), (OTHER TTY INTERRUPTS).
    NOTE THAT CALLS TO THE FUNCTION IOC ALWAYS PERFORM THEIR
    ACTIONS, EVEN IN NOINTERRUPT MODE; THUS (IOC G) WILL DO
    A ↑G-QUIT IN SPITE OF THE STATE OF THE NOINTERRUPT MODE.
[5] (STATUS DOW) RETURNS ONE OF THE EIGHT SYMBOL ATOMS
    SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,
    SATURDAY, OR NIL (THE LATTER IF ITS DOESN'T KNOW THE DAY).
    USE YOUR IMAGINATIONS! A PRIZE FOR THE BEST HACK USING THIS
[6] COMPLR HAS A NEW SWITCH: V (CORRESPONDS TO THE VARIABLE
    NFUNVARS). IF TRUE (NORMALLY NIL), IT MEANS THAT THERE
    ARE NO FUNCTIONAL VARIABLE USAGES IN YOUR FILE [I.E.
    CONSTRUCTS WHERE YOU SAY (FOO A B), AND FOO IS NOT DIRECTLY 
    THE NAME OF THE FUNCTION, BUT RATHER FOO'S VALUE HOLDS THE 
    NAME OF THE FUNCTION TO BE APPLIED TO A AND B.]
    IN SITUATIONS WHERE FOO IS A FREE SPECIAL VARIABLE, OR ANY
    BOUND VARIABLE OF THE FUNCTION CONTAINING THE FORM (FOO A B),
    COMPLR ASSUMES THAT IT IS A FUNCTIONAL VARIABLE RATHER THAN 
    SOME YET-TO-BE-COMPILED USER FUNCTION.  ONE CAN ALWAYS USE 
    DECLARATIONS NEAR THE BEGINNING OF ONE'S FILES, SUCH AS 
    (*EXPR FOO)  OR (*LEXPR FOO) OR (*FEXPR FOO), BUT WHEN USING 
    THE ALL-VARIABLES-AUTOMATICALLY-MADE-SPECIAL OPTION 
    [THE S SWITCH] IT WOULD MEAN AN UNNECESSARILY LARGE NUMBER 
    OF SUCH DECLARATIONS.  THE NEW V SWITCH IF FOR THE MOST COMMON 
    CASE, IN WHICH THE USER DOES NOT USE FUNCTIONAL VARIABLES.  
    EVEN WHEN THIS SWITCH IS SET, YOU CAN STILL EVALUATE VARIABLES 
    TO GET FUNCTIONS BY USING THE FUNCTION FUNCALL, DESCRIBED IN 
    THE PREVIOUS LISP RECENT.
[7] IN AN ATTEMPT AT MNEMONICITY (MUMBLE!), (STATUS XCTPG)
    IS NOW CALLED (STATUS UUOLINKS), AND THE FUNCTION XCTBLT
    IS NOW INVOKED AS (SSTATUS UUOLINKS).
    YES, INDEED, FOLKS, REMOB, AS, EARLIER, WE THREATENED,
    IS, NOW, NOT AN FSUBR, BUT, TAKING ONE ARGUMENT, A SUBR.
    THE SECOND ARGUMENT TO THE RECLAIM FUNCTION NOW HAS
    A SOMEWHAT DIFFERENT MEANING: IF NIL, IT RECLAIMS ONLY
    THE TOP LEVEL OF A LIST (DOES NOTHING IS FIRST ARG IS
    ATOMIC); IF NON-NIL, IT RECLAIMS ALL LIST, FIXNUM,
    AND FLONUM CELLS WITHIN THE S-EXPRESSION, INCLUDING
    BIGNUMS, BUT NOT ATOMIC SYMBOLS.

9/15/73  GLS, AND JONL

BRIEF SYNOPSIS:
1) NEW FUNCTIONS PROGN AND FUNCALL
2) THE FUNCTION BREAK EXPLAINED
3) NUMBERS ARE ACCEPTABLE AS PROG TAGS
4) MORE EXTENSIONS FOR USERS OF LOWER-CASE CHARS.
5) SOME REMINDERS OF IMPORTANT THINGS ALREADY KNOWN
6) A FEW MORE ARCANE DETAILS ABOUT THE EVALUATOR.


1)
LISP NOW HAS TWO MORE FUNCTIONS:
[1] PROGN, AN LSUBR OF 0 OR MORE ARGS, WHICH (ODDLY ENOUGH)
    RETURNS ITS LAST ARGUMENT (NIL IF NO ARGS).
[2] FUNCALL, AN LSUBR OF 1 OR MORE ARGS. (FUNCALL F X1 X2 ... XN)
    CALLS THE FUNCTION F WITH ARGUMENTS X1, X2, ... XN.
    THIS IS USEFUL IN SITUATIONS WHERE ONE WANTS TO EVALUATE
    SOME EXPRESSION TO OBTAIN THE FUNCTION. THUS
    (FUNCALL (CAR X) A B C) IS SIMILAR TO ((CAR X) A B C)
    BUT LOOKS NICER. ITS PRIMARY USE IS IN THE CASE WHERE
    SOME VARIABLE HAS A FUNCTION AS ITS VALUE, BUT MAYBE ALSO
    HAS A FUNCTION PROPERTY. EXAMPLE:
	((LAMBDA (CAR) (CAR X)) 'FOO)
    RETURNS THE RESULT OF APPLYING THE FUNCTION CAR TO THE
    VALUE OF X; HOWEVER
	((LAMBDA (CAR) (FUNCALL CAR X)) 'FOO)
    RETURNS THE RESULT OF APPLYING THE FUNCTION FOO TO X.


********* INVALIDATED 1 NOV 1973.  (SSTATUS BREAKLOOP) HAS BEEN FLUSHED ******
2)  (SSTATUS BREAKLOOP <FORM>) IS SIMILAR TO (SSTATUS TOPLEVEL <FORM>)
    TOP LEVEL. (ISN'T THAT AMAZING!)
    (STATUS BREAKLOOP), ODDLY ENOUGH, RETURNS THE FORM CURRENTLY
    BEING USED FOR BREAKLOOPS. NIL INDICATES THAT THE
    STANDARD BREAK LOOP IS TO BE USED.
    A NEAR APPROXIMATION TO THE ACTION OF BREAK, AND ITS INTERACTION
    WITH THE FORM SPECIFIED BY (STATUS BREAKLOOP) IS
    (DEFUN BREAK FEXPR (X)
	(AND (EVAL (CADR X))
	     ((LAMBDA (OBARRAY READTABLE ↑Q ↑W)
		      (PRINC '/;BKPT/ )
		      (PRINC (CAR X))
		      (TERPRI)
		      (PROG (V)
			A   (AND (NULL (SETQ V (ERRSET (DO NIL (NIL) (EVAL BLF)))))
				 (GO A))
			     (TERPRI)
			    (RETURN (COND ((EQ V INTERNAL-UNBOUND)
					   (AND (CDDR X) (EVAL (CADDR X))))
					 (V)))))
		(GET 'OBARRAY 'ARRAY)
		(GET 'READTABLE 'ARRAY)
		NIL 
		NIL)))
    BLF IS THE BREAK LEVEL FORM, AND IS WHAT IS SET BY 
    (SSTATUS BREAKLOOP BLF).  THE DEFAULT VALUE IS SOMETHING LIKE
    ((LAMBDA (Z)
	     (COND ((EQ Z '}P) (ERR INTERNAL-UNBOUND))
		   ((EQ (CAR Z) 'RETURN) (ERR (EVAL (CADR Z))))
		   (T (PRINT (EVAL Z)) (TERPRI))))
	(READ))
***** END OF INVALIDATED SECTION *****
***** CESSATION OF INVALIDATION  *****
***** COMPLETION OF DELETION     *****

3) FIXNUMS AND FLONUMS MAY NOW BE USED AS PROG TAGS; THUS
	(PROG (YX)
	      (FOO X)
	 -2   (BAR X)
	 4.72 (OR X (GO -2))
	      (OR YX (GO 4.7))
	      (RETURN '(GO S ARE HAZARDOUS TO YOUR PROGRAMS)))
WILL WORK PERFECTLY WELL.   HOWEVER, BIGNUMS DO NOT WORK AS PROG TAGS.

4) MORE TRIUMPHS FOR LOWER CASE:
[ONE] VALRET NOW KNOWS ABOUT :KILL WRITTEN IN LOWER CASE
      AS WELL AS UPPER CASE. IN EITHER CASE, WHEN ALL
      A VALRET STRING SAYS IS :KILL, THEN A .BREAK 16,120000
      IS DONE INSTEAD OF A VALRET.
[TWO] THE READER NOW ALLOWS LOWER-CASE LETTERS AS
      SUPRA-DECIMAL DIGITS AS WELL AS UPPER CASE WHEN
      (SSTATUS + T) IS DONE.

5) REMEMBER THIS!
A WARNING TO USERS OF PUTPROP, REMPROP, ARGS, ETC:
IN CERTAIN RESTRICTED CASES, THESE FUNCTIONS WILL COPY
THE TOP LEVEL OF THE MENTIONED ATOM'S PROPERTY LIST. THIS HAPPENS 
IN THE CASE WHERE ALL OR PART OF THE PROPERTY LIST LIES IN A PURE 
(READ-ONLY) AREA OF MEMORY; IN PARTICULAR, THIS FACT IS TRUE OF
ATOMIC SYMBOLS ASSEMBLED INTO THE SYSTEM, LIKE CAR AND LAMBDA.

IF YOU FASLOAD IN A FILE WHICH REDEFINES MANY FUNCTIONS 
(LIKE LOADING IN A FILE TWICE OR SOMETHING!) AND YOU GET TIRED 
OF ALL THE WARNING MESSAGES, TRY SAYING (SETQ FASLOAD NIL), WHICH
WILL TURN OFF THE MESSAGES.  THIS CAN BE DONE IN THE MIDDLE OF A
FASLOAD FROM A ↑H BREAK.  (SETQ FASLOAD T) TURNS THEN BACK ON AGAIN.


6) SOME REMNANTS:

 (STATUS RCT ...) AND (SSTATUS RCT ...) HAVE DISAPPEARED.

IN *RSET MODE, THE FUNCTION STORE TRIES TO BE CLEVER ABOUT
CHECKING ITS FIRST ARGUMENT TO MAKE SURE IT IS INDEED AN
ARRAY CALL: ITS FIRST ARGUMENT SHOULD BE OF THE FORM
(A X1 X2 ... XN) WHERE A HAS AN ARRAY PROPERTY OR HAS
AS ITS VALUE AN ATOM WITH AN ARRAY PROPERTY.
IF THESE CONDITIONS ARE NOT MET, STORE MAY BARF AT YOU.
(THEN AGAIN, MAYBE NOT). STORE IS ALSO CLEVER ABOUT
FORMS LIKE (STORE (FUNCALL A X1 ... XN) Y)   AND
	   (STORE (B X1 X2 . . . XN))
WHERE B HAS A MACRO PROPERTY.  TO AVOID TRAPS OF AMBIGUITY, 
ESPECIALLY DURING COMPILATION, USE THE FUNCALL CONSTRUCT 
FOR "VARIABLE" ARRAYS.

CALLS FROM COMPILED CODE, AND ANY OTHER USAGE OF THE CALL UUO, WILL 
PREFER ORDINARY FUNCTIONAL PROPERTIES TO ANY MACRO PROPERTY WHEN 
TRYING TO FIND THE FUNCTION DEFINITION FOR AN ATOM.  IF A CALLED ATOM 
HAS ONLY A MACRO PROPERTY, THEN AN UNDF-FNCTN ERROR INTERRUPT WILL 
HAPPEN.

THE AUTOLOAD MECHANISM DESCRIBED EARLIER IS ACTUALLY MORE
COMPLICATED THAN PREVIOUSLY ADVERTISED. THIS IS HOW IT REALLY
WORKS: IF EVAL, APPLY, OR THE UUO HANDLER IS HANDED AS A FUNCTION
SOME ATOMIC SYMBOL WHOSE PROPERTY LIST HAS AN AUTOLOAD
PROPERTY (AND NO OTHER FUNCTIONAL PROPERTY
IS AHEAD OF IT ON THE PROPERTY LIST), THEN USER INTERRUPT
NUMBER 18. (THAT'S EIGHTEEN DECIMAL) IS INVOKED; AS ITS SINGLE
ARGUMENT THE INTERRUPT FUNCTION IS HANDED A DOTTED PAIR WHOSE
CAR IS THE ATOMIC SYMBOL AND WHOSE CDR IS THE AUTOLOAD PROPERTY
(JUST TO MAKE THINGS EASY). INITIALLY, THE HANDLER FOR INTERRUPT 18.
IS SOMETHING LIKE
(DEFUN +INTERNAL-AUTOLOAD (X) (APPLY (FUNCTION FASLOAD) (CDR X)))
AS AND WHEN THE INTERRUPT HANDLER DECIDES TO RETURN, IT
DARN WELL BETTER HAVE STUCK SOME OTHER KIND OF FUNCTION PROPERTY
ON THE PROPERTY LIST OF THE ATOMIC SYMBOL! (IT IS NOT
NECESSARY TO REMPROP THE AUTOLOAD PROPERTY, SO LONG AS THE
OTHER ONE COMES FIRST ON THE PROPERTY LIST.) IS THE INTERRUPT
HANDLER FAILS TO DO THIS, AN UNDF-FNCTN INTERRUPT WILL HAPPEN,
WITH A MESSAGE LIKE "FUNCTION UNDEFINED AFTER AUTOLOAD".

MAKUNBOUND HAS BEEN CHANGED SLIGHTLY FOR COMPATIBILITY:
IT NOW RETURNS ITS ARGUMENT, RATHER THAN RETURNING
THE INTERNAL UNBOUND MARKER.

THE ; READ-MACRO FUNCTION IS NOW MORE CLEVER ABOUT THE
SITUATION WHERE IT HITS THE END OF A FILE BEFORE FINDING
A CARRIAGE RETURN.


7/31/73	  - GLS, JONL -  		LISP 523

BRIEF SYNOPSIS:
    1) NEW AUTOLOAD FEATURE FOR NON-CORE-RESIDENT FUNCTIONS
    2) EXTENSIONS TO SORT AND SORTCAR TO ALLOW SORTING
	OF LISTS WITHOUT INTERMEDIATE USE OF ARRAYS.
    3) FILLARRAY SUPERSEDES INITARRAY
    4) LISTIFY OPTIONS EXTENDED TO GET LAST N ARGS TO AN LEXPR AS
    5) (ARG NIL) USED TO OBTAIN THE NUMBER OF ARGS PASSED TO AN LEXPR.
	WELL AS THE FIRST N.
    6) THE ATOM "PNAME" WILL NO LONGER USED.  BEGINNING WITH LISP 523,
	"SYMBOL" WILL BE THE RESULT OF TYPEP FOR THAT CLASS OF OBJECTS.
    7) THE FILE .INFO.;LISP FCNS  HAS AN ALPHABETIZED TABLE OF 
	INITIAL LISP FUNCTIONS AND GLOBAL VARIABLES.
    8) COMPLR HAS QUOTING CHAR FOR FILE NAME SPECS, AND ACCEPTS 
	MULTIPLE INPUT FILES.


THE AUTOLOAD FEATURE HAS BEEN GENERALIZED FOR USE BY LOSERS:
AN "AUTOLOAD" PROPERTY ON AN ATOM IS TREATED BY THE INTERPRETER 
VERY MUCH LIKE A FUNCTIONAL PROPERTY.  IF "AUTOLOAD" IS THE FIRST 
FUNCTIONAL PROPERTY ON AN ATOMS PROPERTY LIST, THEN THE INTERPRETER
WILL FIRST FASLOAD IN THE FILE SPECIFIED UNDER THAT PROPERTY.
THUS, IF YOU HAVE SAID (DEFPROP FOO (BAR FASL DSK QUUX) AUTOLOAD)
OR THE EQUIVALENT, AND THEN TRY TO USE FOO AS A FUNCTION
[AND THE AUTOLOAD PROPERTY IS FOUND BEFORE ANY OTHER KIND OF
FUNCTIONAL PROPERTY]; THEN EVAL (OR WHOEVER) WILL FASLOAD IN
DSK:QUUX;BAR FASL, AND TRY AGAIN TO GET A MORE STANDARD FUNCTION 
PROPERTY FOR FOO (WHICH HAD DARNED WELL BETTER BE REDEFINED BY THE
FILE AS SOMETHING ELSE OTHER THAN "AUTOLOAD").

THE SORT FUNCTIONS HAVE BEEN EXTENDED AS FOLLOWS: IF THE FIRST
ARGUMENT TO SORT OR SORTCAR IS NOT A LIST, THEN IT
HAD BETTER BE AN ARRAY, AND THE CURRENT ARRAY SORT IS USED. IF IT IS
A LIST, THEN A SUPER-WINNING MERGE SORT (CODED IN LISP BY MJF, THEN
HAND-TRANSLATED TO MIDAS) IS USED. THE ITEMS OF THE LIST ARE ORDERED
BY DOING MANY RPLACD'S ON THE LIST; THUS IF YOU DON'T WANT YOUR LIST
DESTROYED, COPY IT FIRST BY SAYING (SORT (APPEND FOO NIL) 'PRED)
INSTEAD  OF (SORT FOO 'PRED) OR WHATEVER. IF YOU DON'T CARE, THEN YOU
PROBABLY WANT TO USE IT LIKE DELQ IS USUALLY USED:
SAY (SETQ FOO (SORT FOO 'PRED)). THE EXISTENCE OF THIS NEW MERGE SORT 
OF COURSE OBSOLETES THE EXAMPLE GIVEN PREVIOUSLY FOR SORTING A LIST.
THE MERGE SORT IS GENERALLY FASTER THAN THE ARRAY SORT, AT THE EXPENSE
OF THE DATA OCCUPYING TWICE AS MUCH CORE (OF COURSE, THE DATA WILL
RESIDE IN DIFFERENT AREAS OF CORE ALSO: BPS FOR ARRAY SORT,
LIST SPACE FOR MERGE.)


THE FUNCTION INITARRAY PREVIOUSLY ADVERTISED HAS DISAPPEARED:
FILLARRAY HAS BEEN GENERALIZED TO SERVE THE SAME PURPOSE.
IF THE LIST GIVEN TO FILLARRAY IS TOO SHORT, THEN FILLARRAY USES
THE LAST ITEM TO FILL OUT THE REST OF THE ARRAY. THUS
(FILLARRAY 'BAR '(FOO)) <=> (INITARRAY 'BAR 'FOO).
NO GUARANTEES ABOUT ANYTHING IF YOU HAND FILLARRAY AN ATOM
INSTEAD OF A NON-NIL LIST!


THE FUNCTION LISTIFY HAS BEEN GENERALIZED SO THAT IF YOU HAND IT
A NEGATIVE ARG THEN THE LAST N ARGS ARE LISTIFIED UP INSTEAD OF THE
FIRST N. THUS:
((LAMBDA N (LIST (LISTIFY -3) (LISTIFY 3)) 'A 'B 'C 'D 'E)
EVALUATES TO ((C D E) (A B C)). (THIS IS SIMILAR TO THE CONVENTION
WITH HAIPART, IF THAT'S ANY HELP...)

FINALLY, IF YOU SAY (ARG NIL) INSIDE AN LSUBR/LEXPR, YOU GET BACK
THE NUMBER OF ARGS SUPPLIED TO THAT LSUBR/LEXPR.


SPEAKING OF TYPEP, IN NLISP (TYPEP 'FOO) RETURNS THE ATOM "SYMBOL",
NOT THE ATOM "PNAME".  THIS IS BECAUSE, EVENTUALLY (INDEED, ALREADY,
ON MULTICS), ATOMS WILL NOT HAVE PNAME PROPERTIES ON THEIR PROPERTY
LISTS, BUT WILL STORE THE PACKED-ASCII CHARACTERS OF THE PRINT-NAME
IN A MORE EFFICIENT FASHION.  ALSO, IN SOME PAROCHIAL PARTS OF THE
LISP WORLD, THERE ARE BELIEVERS WHO BELIEVE THAT EVERY OBJECT "HAS" A
PRINT-NAME AND HENCE "PNAME" DOES NOT UNIQUELY IDENTIFY THAT CLASS 
OF OBJECTS THAT WE HAVE ALL COME TO KNOW AND LOVE SO WELL.  IN THE 
FUTURE, WE WILL TRY TO REFER TO MEMBERS OF THIS CLASS OF OBJECTS 
AS "SYMBOLS".


THE FILE .INFO.;LISP FCNS  HAS BEEN CLEANED UP A BIT;  IT CONTAINS
A TABLE OF ALL CURRENT INITIAL LISP FUNCTIONS, AND TOP-LEVEL GLOBAL
VARIABLES.  TAKE A LOOK.

WRONG-NUMBER-OF-ARGS CHECKING IN NLISP IS SOMEWHAT IMPROVED.
(TRY, FOR INSTANCE, (QUOTE A B) AND SEE WHAT YOU GET.)

A REMINDER: (FIXP X) IS NON-NIL (EQUAL TO THE ARG) IFF X IS A BIGNUM
OR A FIXNUM. FOR A FIXNUM-ONLY TEST, USE (EQ (TYPEP X) 'FIXNUM).



SOME LOSERS WANT TO COMPILE FILES WITH ODDBALL NAMES [SUCH AS, NAMES 
CONTAING <SPACE>, ;, :, ← AND OTHERS].  THESE NAMES MAY BE TYPED AT 
COMPLR BY QUOTING THE OFFENDING CHARACTERS WITH "/".  THE MAKLAP 
PARSER WILL NOW ACCEPT MULTIPLE INPUT FILE SPECIFICATIONS, SEPARATED 
BY COMMAS, AND COMPILE ALL AS IF THEY WERE CONCATENATED, LEFT TO 
RIGHT, IN ONE BIG INPUT FILE;  SIMILARLY, FASLAP WILL ASSEMBLE 
MULTIPLE INPUT FILES INTO ONE FASL FILE.  EXAMPLE COMMAND:

←TGQ:MOBY LAP←TMQ:DECLAR 2/←1,TLQ:OLD SRC/ / @

COMPLR WILL ALSO PUT A SEMI-COLON COMMENT NEAR THE HEAD OF THE LAP 
FILE TELLING THE DATE AND TIME OF COMILATION.  THESE FEATURES ARE 
IN EFFECT AS OF COMPLR 338.



TUESDAY  JULY 10,1973		FQ+3D.0H.44M.22S.	- GLS -

			TRY NLISP!

THERE ARE SEVEN NEW FUNCTIONS IN THE LATEST NLISP.
THE FIRST IS A NEW STATUS CALL: (STATUS FEATURES) RETURNS A LIST OF
FEATURES IMPLEMENTED IN THE LISP. THIS FEATURES LIST IS A LIST OF
ATOMIC SYMBOLS WHICH CAN CONVENIENTLY BE MEMQ'ED, PRINTED, OR
WHATEVER. CURRENTLY THESE ATOMS MAY APPEAR ON THE FEATURES LIST:
	BIBOP		;HAIRY PAGING SCHEME (BEING IMPLEMENTED)
	LAP
	SORT		;FUZZY SORT FUNCTIONS (SEE BELOW)
	EDIT
	FASLOAD
	↑F		;MOBYIO PACKAGE
	BIGNUM
	ML		;THIS LISP IS ON MATHLAB
	AI		;THIS LISP IS ON AI
	ITS		;THIS LISP IS ON SOME ITS SYSTEM
	DEC10		;THIS LISP IS ON A DECSYSTEM-10 MONITOR
(CAR (LAST (STATUS FEATURES))) IS GENERALLY CONSIDERED TO BE
AN IMPLEMENTATION NAME; THUS IT WILL BE "ITS" OR "DEC10"
(OR MAYBE EVENTUALLY "MULTICS", ON THAT SYSTEM). THIS IS USEFUL
FOR PRINTING HEADINGS OR WHATEVER.
THE MAIN IDEA BEHIND THIS STATUS CALL IS THAT AN APPLICATION
PACKAGE CAN LOAD UP INTO ANY MACLISP IMPLEMENTATION AND DECIDE
WHAT TO DO ON THE BASIS OF THE FEATURES IT FINDS AVAILABLE.

EXAMPLE:

(COND ((MEMQ 'BIGNUM (STATUS FEATURES))
       (PROG2 NIL (EVAL (READ)) (READ)))
      (T (READ) (EVAL (READ))))

(DEFUN FACTORIAL (N)			;BIGNUM VERSION
       (COND ((ZEROP N) 1)
	     ((TIMES N (FACTORIAL (SUB1 N))))))

(DEFUN FACTORIAL (N)			;FIXNUM-ONLY VERSION
       (COND ((> N 13.) (BARF 'FACTORIAL/ TOO/ BIG))
	     ((ZEROP N) 1)
	     ((* N (FACTORIAL (1- N))))))



THREE OF THE NEW FUNCTIONS ARE FOR ARRAY MANIPULATION; THEY
ARE INTENDED TO MAKE ARRAYS SOMEWHAT LESS PAINFUL TO USE. THEY ARE:

********** OBSOLETE 7/30/73 **********
* INITARRAY	SUBR 2 ARGS
* (INITARRAY 'FOO 'GLITCH) INITIALIZES ALL ENTRIES OF THE ARRAY FOO
* TO CONTAIN GLITCH. (THIS IS A STORE-TYPE INITIALIZATION, NOT NSTORE;
* BUT THE KLUDGY 18-BIT NUMBER ARRAYS WILL DISAPPEAR EVENTUALLY ANYWAY.)
* THUS TO ZERO OUT AN ARRAY, SAY (INITARRAY 'FOO NIL).
* THERE! NOW ISN'T THAT NICER THAN SAYING (BLTARRAY 'ZEROARRAY 'FOO)?
* INITARRAY RETURNS ITS SECOND ARGUMENT.
********** OBSOLETE TO HERE **********

FILLARRAY	SUBR 2 ARGS
(FILLARRAY <ARRAY> <LIST>) FILLS THE ARRAY WITH CONSECUTIVE ITEMS
FROM THE LIST; THUS (FILLARRAY 'ZTESCH '(A B C)) IS LIKE
	(PROG NIL (STORE (ZTESCH 0) 'A)
		  (STORE (ZTESCH 1) 'B)
		  (STORE (ZTESCH 2) 'C)
		  (RETURN 'ZTESCH))
IF THE ARRAY IS TOO SHORT TO CONTAIN ALL OF THE  ITEMS
IN THE LIST, THE EXTRA ITEMS ARE IGNORED. IF THE LIST IS TOO
SHORT TO COMPLETELY FILL THE ARRAY, THE EXTRA ARRAY SLOTS ARE 
FILLED WITH THE LAST ITEM FROM THE LIST.  FILLARRAY RETURNS ITS 
FIRST ARGUMENT AS VALUE.

LISTARRAY	SUBR 1 ARG
(LISTARRAY 'SNARK) CONSES UP ALL ITEMS IN THE S-EXPRESSION ARRAY 
SNARK, IN ORDER, AND RETURNS THEM AS A LIST. THUS:
	(ARRAY QUUX T 10)
	(FILLARRAY 'QUUX '(A B C D E))
	(LISTARRAY 'QUUX)
RETURNS (A B C D E E E E).



THE OTHER THREE FUNCTIONS COMPRISE THE NEW SORTING PACKAGE.
FOR ARRAYS, THEY USE THE QUICKSORT METHOD DESCRIBED IN
KNUTH (VOL 3, P. 114 FF.) THIS METHOD GIVES THE SORT FUNCTIONS
THE FOLLOWING PROPERTIES:
[1] THE SORT IS GUARANTEED TO TERMINATE, NO MATTER WHAT PREDICATE
    IS USED FOR SORTING (SEE BELOW.) THAT IS, GIVING SORT THE
    WRONG FUNCTION WON'T CAUSE IT TO HANG OR LOOP.
[2] THE SORT IS **NOT** STABLE. EQUAL KEYS WILL NOT STAY IN THEIR
    ORIGINAL ORDER; IN FACT, EQUAL KEYS WILL BE ORDERED RANDOMLY
    (SINCE THE ALGORITHM USES A RANDOM NUMBER GENERATOR TO FEND
    OFF CERTAIN WORST CASES.)
[3] THE SORT IS, ON THE AVERAGE, ON THE ORDER OF N LOG N IN SPEED.
    PRELIMINARY TIMING TESTS SHOW THAT 2500. ATOMIC SYMBOLS
    WERE SORTED ALPHABETICALLY IN 10. SECONDS OR RUNTIME, AND
    10000. ATOMS IN 40. SECONDS OF RUNTIME.
FOR LISTS, THE METHOD USED IS THE MERGE SORT [KNUTH, VOL. 3, PP. X]
THE ARGUMENT LIST IS REARRANGED WITH RPLACD, AND A SORTED LIST IS 
RETURNED;  THUS TO SORT A LIST CURRENTLY THE VALUE OF THE VARIABLE L,
AND MAKE THE SORTED LIST THE NEW VALUE OF L, DO 
		(SETQ L (SORT L 'PRED))


THE FUNCTIONS ARE INDIVIDUALLY DESCRIBED BELOW:

SORT		SUBR 2 ARGS
THE FIRST ARGUMENT TO SORT IS AN S-EXPRESSION ARRAY OR A LIST, 
THE SECOND A PREDICATE OF TWO ARGUMENTS. THE DOMAIN OF THE PREDICATE
SHOULD INCLUDE ALL THE ITEMS IN THE LIST OR ARRAY TO BE SORTED.
THE PREDICATE SHOULD BE A LISP FUNCTION OF TWO ARGUMENTS WHICH 
DEFINES A WELL-ORDERING OVER ITS DOMAIN,  AND HAS THE SENSE THAT 
THE FIRST ARGUMENT "PRECEEDS" THE SECOND WHEN THE PREDICATE IS TRUE,
AND THE SECOND "PRECEEDS" THE FIRST WHEN FALSE.
NOTE THAT SINCE SORTING REQUIRES MANY COMPARISONS,
AND THUS MANY CALLS TO THE PREDICATE, SORTING WILL BE MUCH FASTER
IF THE PREDICATE IS A COMPILED FUNCTION RATHER THAN INTERPRETED.
SORT, LIKE THE MAP SERIES OF FUNCTIONS, WILL TRY TO ESTABLISH A 
DIRECT MACHINE-INSTRUCTION SUBROUTINE LINK TO THE FUNCTIONAL 
ARGUMENT WHENEVER THAT IS POSSIBLE.

EXAMPLE:

(DEFUN MOSTCAR (X)
       (COND ((ATOM X) X)
	     ((MOSTCAR (CAR X)))))

(SORT FOOARRAY
      (FUNCTION (LAMBDA (X Y)
			(ALPHALESSP (MOSTCAR X) (MOSTCAR Y)))))

IF FOOARRAY CONTAINED THESE ITEMS BEFORE THE SORT:

	(TOKENS (THE LION SLEEPS TONIGHT))
	(CARPENTERS (CLOSE TO YOU))
	((ROLLING STONES) (BROWN SUGAR))
	((BEACH BOYS) (I GET AROUND))
	(BEATLES (I WANT TO HOLD YOUR HAND))

THEN AFTER THE SORT FOOARRAY WOULD CONTAIN:

	((BEACH BOYS) (I GET AROUND))
	(BEATLES (I WANT TO HOLD YOUR HAND))
	(CARPENTERS (CLOSE TO YOU))
	((ROLLING STONES) (BROWN SUGAR))
	(TOKENS (THE LION SLEEPS TONIGHT))


SORTCAR		SUBR 2 ARGS
SORTCAR IS EXACTLY LIKE SORT, BUT THE ITEMS TO BE SORTED SHOULD
ALL BE NON-ATOMIC. SORTCAR TAKES THE CAR OF EACH ITEM BEFORE
HANDING TWO ITEMS TO THE PREDICATE. THUS SORTCAR IS TO SORT
AS MAPCAR IS TO MAPLIST.




7/8/73 - JONL -

			TRY NLISP!

POSSIBLE DIFFICULTIES:
   1) EQ WILL NOT BE GUARANTEED TO WORK ON SMALL FIXNUMS.  ONE SHOULD 
	USE = OR EQUAL AS APPROPRIATE.
   2) ZEROP MUST BE COMPILED DIFFERENTLY FOR NLISP THAN FOR LISP.  
	THUS IF YOUR CODE HAS ANY ZEROP'S IN IT,  YOU WILL HAVE TO 
	RECOMPILE EITHER WITH SYS:TS XCOMPLR, WHICH IS A NORMAL COMPLR
	SET UP TO COMPILE ZEROP FOR NLISP, OR WITH SYS:TS NCOMPLR, 
	WHICH IS THE SUPER-DUPER-WINNING COMPILER THAT HAS BEAT OUT 
	FORTRAN ON REASONABLE NUMERICAL PROGRAMS.  ERIC ROSEN, WHO IS 
	IN T.S. 834 FOR THE REMAINDER OF THE SUMMER, WILL BE ABLE TO
	HELP YOU WITH THE DECLARATIONS TO NECESSARY TO GIVE YOU AS 
	MUCH OPEN-CODED REAL, LIVE ARITHMETIC AS IS POSSIBLE IN A 
	LISP PROGRAM.
   3) THUS MANY PROGRAMS WILL BE LISP-NLISP COMPATIBLE, OR CAN BE MADE
	SO BY THE REPLACEMENT OF (ZEROP X) WITH (= X 0), AND THE 
	CAREFUL REMOVAL OF ANY USE OF EQ ON NUMBERS.  AS OF THIS DATE,
	COM:LAP FASL, COM:GRIND FASL, AND COM:INDEX FASL ARE SO 
	COMPATIBLE.  HOPEFULLY, THERE WILL BE A COMPATIBLE CNVR 
	FORTHCOMING.  THE COMPATIBLE INDEXER, HOWEVER, WILL PROPERLY 
	INDEX CNVR CODE WHEN CNPARSE IS SET TO NON-NIL.
   4) JONL WILL BE ON VACATION FROM TUESDAY, JULY 10, UNTIL SUNDAY,
	JULY 22.  HOPEFULLY, GUY STEELE [GLS] WILL BE ABLE TO HELP 
	ALL YOU LISP LOSERS OUT THERE OVERCOME THE UNEXPECTED 
	"FEATURES".  AT ANY RATE, DONT HESITATE TO LEAVE MAIL.



THE SYSTEM INDEXER, OBTAINABLE BY FASLOADING IN COM:INDEX FASL, NOW
HANDLES CNVR FILES APPROPRIATELY.  BY SETTING THE VARIABLE CNPARSE
TO NON-NIL, YOU MAY INFORM THE INDEXER THAT A CNVR FILE IS COMING,
AND THAT IT SHOULD OBEY THE CNVR READ MACROS.


THE VALUE OF THE VARIABLE EDIT IS NOW (AS OF LISP 486) A LIST OF FLAGS
THAT THE IN-CORE EDITOR WILL USE WHEN SEARCHING FOR A FUNCTION 
DEFINITION.  THUS TO EDIT CNVR FUNCTIONS, ONE MAY WANT TO DO
		(SETQ EDIT (CONS 'CEXPR EDIT))
THE VALUE OF THE VARIABLE }}} IS THE BACK-UP CHAIN FOR THE EDITOR, 
THE CAR OF WHICH WILL BE POINTING TO THE PLACE IN YOUR FUNCTION WHERE
THE CURRENT EDIT CURSOR IS. THUS, ONE MAY USE THE EDITOR TO POSITION
THE EDIT-CURSOR, AND THEN RUN OTHER PROGRAMS THAT "TAKE IT FROM THERE"


THE NEW FUNCTION LISTIFY, A SUBR OF ONE ARGUMENT, MAY BE OF USE TO 
THOSE WHO USE LEXPRS.  IT IS ESSENTIALLY A FAST, HAND-CODED VERSION 
OF THE FOLLOWING EXPR:
   (DEFUN LISTIFY (N) 
	(COND ((ZEROP N) NIL)
	      ((DO  ((I 1 (1+ I)) (L NIL))
		    ((> I N) (REVERSE L))
		 (SETQ L (CONS (ARG I) L))))))
IN SHORT, IT MAY BE USED TO QUICKLY UNSTACK THE ARGUMENTS TO AN LEXPR,
AND CONS THEM UP INTO A LIST.
********** HAS BEEN EXTENDED - SEE NOTE OF 7/30/73 **********

 

(STATUS LINEL . . .) AND (STATUS CHRCT . . .)  HAVE BEEN FLUSHED, 
SINCE THIS IS NOT THE WAY THEY WILL BE USED IN THE NEW MULTIPLEL I/O 
CHANNEL SCHEME.  THIS HIGHLY DESIRABLE FEATURE, WHICH IS PARTIALLY 
IMPLEMENTED, MIGHT BE FINISHED IF AND WHEN STAVROS EVER COMES BACK 
FROM GREECE.  THEN AGAIN, IT MIGHT NOT.


BOTH MIDAS AND MACLISP ARE NOW AVAILABLE FOR USE ON A DEC SYSTEM-10
TIME-SHARING MONITOR [AND CONSEQUENTLY, FOR USE UNDER A TENEX MONITOR]
FOR MORE INFORMATION, LEAVE MAIL FOR JONL.

5/22/73  - JONL - 


A NEW LSUBR, ERROR, OF 0, 1, 2, OR 3 ARGS IS NOW AVAILABLE TO ALLOW 
THE USER TO ENTER THE LISP ERROR SYSTEM.  THE FIRST ARG, IF PRESENT,
IS TAKEN TO BE A MESSAGE, AND IS PRINC'D  JUST LIKE THE MESSAGES THAT
ARE PRINTED OUT WHEN AN ERROR IS DETECTED BY THE LISP SYSTEM.  THE
SECOND ARG, IF PRESENT, IS CONSIDERED TO BE AN OFFENDING PIECE OF 
DATUM WHICH IS PRINTED JUST BEFORE THE MESSAGE.  THE THIRD ARG, IF 
PRESENT, IS TAKEN TO BE AN LISP ERROR INTERRUPT NUMBER, OR THE ATOM 
WHOSE VALUE HOLDS THAT INTERRUPT FUNCTION; AND THE  CORRESPONDING 
CORRECTABLE-ERROR INTERRUPT FUNCTION IS CALLED. IN THIS LAST
CASE, THE SECOND ARG TO ERROR IS PASSED ALONG AS THE ARGUMENT TO THE 
INTERRUPT FUNCTION [THE USUAL PROTOCOL FOR CORRECTING AN ERROR 
APPLIES, SEE PRIOR DISCUSSION IN THIS FILE], AND THE CORRECTED 
RETURN-VALUE IS THE VALUE OF ERROR.  IF THERE IS NO THIRD 
ARGUMENT, THEN AN ORDINARY BOMB-OUT UNCORRECTABLE LISP ERROR IS 
PERFORMED.  FOR EXAMPLE, SUPPOSE ONE WANTS TO CAUSE A WRNG-TYPE-ARG 
ERROR WHEN AN ATOM ATOM PASSED TO "GOODP" IS EITHER UNBOUND (IN THE 
LISP SENSE) OR ELSE HAS THE VALUE "MUNBOUND":
(DEFUN GOODP (X)
	(COND ((OR (NOT (EQ (TYPEP X) 'PNAME))
		   (NOT (BOUNDP X))
		   (EQ (EVAL X) 'MUNBOUND))
		(ERROR 'ATOM-WITH-RANDOM-VALUE X 7))
	      (T X)))
BRIEF REVIEW ERROR INTERRUPT FUNCTION NUMBERS, AND GLOBAL VARIABLE 
WHOSE  VALUE HOLDS THE INTERRUPT FUNCTION:
  ERROR CHANNEL #    USER INTERRUPT #	  GLOBAL VARIABLE
	0		    5		    UNDF-FUNCTION
	1		    6		    UNBND-VRBL
	2		    7		    WRNG-TYPE-ARG
	3		    8.		    UNSEEN-GO-TAG
	4		    9.		    WRNG-NO-ARGS
	5		    10.		    GC-LOSSAGE
	6		    11.		    FAIL-ACT
NOTE THAT (ERROR) EVAL'S THE SAME AS (ERR), AND IN THE EXAMPLE 
ABOVE, ONE COULD ALSO HAVE WRITTEN 
	(ERROR 'ATOM-WITH-RANDOM-VALUE X 'WNRG-TYPE-ARG)




CURSORPOS HAS BEEN MADE AN LSUBR - WITH NO ARGUMENTS IT RETURNS THE 
POSITION OF THE DISPLAY CURSOR AS A DOTTED PAIR (LINENO . COLUMNO),
WHERE LINE NUMBER 0 IS THE TOP LINE OF THE SCREEN, AND COLUMN NUMBER 0
IS THE LEFTMOST [FOR NON-DISPLAY CONSOLES, CURSORPOS ALWAYS RETURNS 
NIL].  WITH TWO ARGUMENTS, (CURSORPOS X Y) MOVES THE DISPLAY CURSOR 
TO THE XTH LINE, YTH COLUMN, AND THEN RETURNS T [AGAIN, RETURNS NIL
FOR NON-DISPLAY CONSOLES].



A NEW SUBR OF THREE ARGUMENTS, SETSYNTAX, IS IMPLEMENTED TO FACILITATE
CERTAIN READTABLE SYNTAX HACKING.  THE ARGUMENTS ARE
  1) EITHER A FIXNUM LESS THAN 128., OR A SINGLE CHARACTER, WHICH
	SPECIFIES THE ENTRY OF THE READTABLE TO BE HACKED;
  2) ONE OF  2A) NIL, MEANING NO ACTION ON THE CHAR'S SYNTAX,
	     2B) A FIXNUM, WHICH IS THE NEW SYNTAX CATEGORY FOR 
		 THE FIRST ARG,
	     2C) A SINGLE-CHARACTER ATOM, MEANING NEW SYNTAX FOR FIRST
		 ARG TO BE SAME AS THE INITIAL, SYSTEM-SET SYNTAX 
		 FOR THIS CHAR,
	     2D) THE ATOM "MACRO", MEANING ELEMENTAL READ-MACRO 
		 SYNTAX, AND IMPLYING THAT THE THIRD ARG IS THE MACRO
		 FUNCTION,
	     2E) THE ATOM "SPLICING", MEANING SPLICING READ-MACRO;
  3) ONE OF 3A) NIL, MEANING NO ACTION ON CHTRAN OF FIRST ARG, OR 
		 ELSE, IF SECOND ARG IS OPTION 2D OR 2E, THEN MEANING 
		 IS TO TURN OFF THE READ-MACRO, RESTORING THE SYNTAX 
		 AND CHTRAN TO THE INITIAL SYSTEM VALUE FOR THAT CHAR,
	    3B) A FIXNUM, MEANING THE ASCII INPUT TRANSLATION FOR THE
		 FIRST ARG,
	    3C) A SINGLE CHARACTER ATOM, MEANING TRANSLATE TO ASCII 
		 VALUE OF THAT CHARACTER,
	    3D) A FUNCTION, WHICH IS THE MACRO FUNCTION REQUIRED BY 
		 OPTIONS 2D AND 2E.
SETSYNTAX ALWAYS RETURNS T.



TWO NEW STATUS CALLS:
  (STATUS UDIR) RETURNS AN ATOM WHOSE PNAME IS THE SAME AS THE INITIAL
	WORKING DIRECTORY OF THE USER LOGGED IN.  ON THE PDP10 SYSTEM,
	THIS WILL ALWAYS BE THE SAME AS (STATUS UNAME), BUT ON THE 
	MULTICS SYSTEM, THESE TWO ARE DIFFERENT.
  (STATUS HACTRN) RETURNS NON-NIL IF AND ONLY IF THE LISP IS AN 
	INFERIOR JOB TO A HACTRN.  THIS WILL ALLOW A LISP IN A 
	DISOWNED TREE TO CONTINUE INTERACTION WITH A HACTRN ABOVE IT,
	TYPICALLY FOR THE PURPOSE OF ADDING TO, OR INSPECTING ITS JOB
	SYMBOL TABLE.  ALSO, ONE MIGHT TEST THIS BEFORE VALRET'ING A 
	STRING.  NEEDLESS TO SAY, THIS CALL IS IMPLEMENTED ONLY IN 
	THE ITS PDP10 VERSION.


5/9/73  - JONL -

ERRORS GENERATED BY THE DISPLAY SLAVE ARE NOW CORRECTABLE, FAIL-ACT 
TYPE.  REMINDER:  IF THE FAIL-ACT INTERRUPT HANDLER RETURNS A NON-NULL
LIST, THEN THE CAR OF THAT LIST IS EVAL'D AND THE RESULTANT RETURNED
AS THE VALUE OF THE FORM WHICH LOST;  THE SYSTEM-SUPPLIED FAIL-ACT 
HANDLER IS A BREAK LOOP, AND IF ONE DESIRES TO PROCEED (ACCEPTING AN
OUTPUT VALUE OF T) HE CAN TYPE
(RETURN '(T))
TYPING <ALT-MODE>P<SPACE>   IS THE SAME AS RETURNING NIL, WHICH CAUSES
THE ERROR HANDLER TO GO THE ROUTE OF ALL UNCORRECTED ERRORS.


THERE IS A MANUAL FOR THE MULTICS VERSION OF MACLISP IN THE 
PREPARATION.  IT MAY PROVE TO BE OF MUCH USE EVEN TO THE PDP10 
MACLISP USER.


LISP WILL NOW ACCEPT A COMMAND LINE FROM DDT, IN THE FASHION OF THE
HACTRN COMMAND LINE.  THE SIGNIFICANCE OF THIS LINE FOR LISP IS THAT
IT IS USED TO SPECIFY A FILE FOR INITIAL LOADING, JUST AS THE 
.LISP. (INIT) FILE IS USED.  THUS, THE FIRST S-EXPRESSION ON THE FILE
MUST BE A COMMENT, WHOSE ALTERNATING PAIRS GIVE ALLOCATION REQUESTS;
THE REMAINDER OF THE FILE MAY BE ANY S-EXPRESSIONS.  FOR EXAMPLE, IF
ONE HAS A FILE "INDEX LOADER" ON HIS DIRECTORY WHICH CONTAINS

(COMMENT CORE 70 FXS 5000 FLPDL 1)
(FASLOAD INDEX FASL COM)

THEN WHEN HE TYPES AT DDT
:LISP INDEX LOADER<CARRIAGE-RETURN>

HE WILL FIND HIMSELF WITH A 70-BLOCK LISP (WITH A LITTLE EXTRA FIXNUM
SPACE, AND A MINIMAL FLONUM PDL) WHICH HAS BEEN EMBELLISHED WITH THE 
LISP INDEXER.  THE COMMAND LINE IS ALLOWED TO BE ANY ITS FILE 
SPECIFICATION, WITH DEFAULTING ON THE DEVICE TO BE DSK, AND
DEFAULTING ON THE SNAME TO BE THAT SET BY HACTRN.
REMINDER: THE FIRST ITEM OF AN ALTERNATING PAIR IN THE
COMMENT FOR ALLOC IS SPELLED EXACTLY THE WAY ALLOC SPELLS IT WHEN IT
TYPES THE QUESTIONS AT YOU;  IF YOU WANT TO TRY IT, JUST TYPE "Y" TO
THE QUESTION "ALLOC?" AND NOTE THE KINDS OF SPACES THAT ARE ASKED 
ABOUT.



4/15/73  -JONL-

RUBOUT WHEN TYPED FROM THE JOB CONSOLE AT A DATAPOINT SHOULD DO 
    SOMETHING A LITTLE MORE INTERESTING THESE DAYS.  HOWEVER, IT IS
    NOT POSSIBLE TO DO THINGS CORRECTLY  WHEN TYPE-IN ECHO IS 
    INTERMINGLED WITH PROGRAM TYPE-OUT, SO IF YOU GET CONFUSED, 
    TRY ↑K AND ↑L.

THE LSUBRS "-", "-$", "/", AND "/$" NOW OPERATE IN ACCORD WITH THE 
    COMMON USAGE WHEN GIVEN ONE ARGUMENT:  NAMELY, THE OPERATION IS 
    PERFORMED WITH THE OPERATOR IDENTITY AND THE SINGLE ARG.  THIS 
    NEW DEFINITION HAS NO EFFECT FOR THE COMMUTATIVE OPERATORS, BUT 
    ALLOWS ONE TO WRITE (- N) INSTEAD OF (MINUS N) AND TO WRITE 
    (//$ X) INSTEAD OF (QUOTIENT 1.0 X). ALTHOUGH THIS VARIES SLIGHTLY
    FROM THE SIMPLER DEFINITION FORMAT, IT SEEMS TO BE PREFERRED BY 
    MOST PROGRAMMERS.


A NEW SUBR OF NO ARGUMENTS - CURSORPOS - WILL RETURN A DOTTED PAIR 
    FOR THE COLUMN POSITION AND ROW POSITION OF THE CURSOR AT A 
    DISPLAY TERMINAL.  RETURNS NIL FOR OTHER TERMINALS.

TWO NEW BIT-DIDDLING FUNCTIONS - HAULONG, A SUBR OF ONE ARGUMENT, AND
    HAIPART, A SUBR OF TWO ARGUMENTS.  (HAULONG X) EXPECTS X TO BE 
    EITHER A FIXNUM OR BIGNUM, AND, IN INFORMAL LANGUAGE, RETURNS 
    THE NUMBER OF BITS IN X.  MORE PRECISELY, IT IS 
	  <INTEGRAL PART OF LOG TO THE BASE 2 OF ABS[X]>+1
    INFORMALLY, (HAIPART X N) RETURNS A NUMBER WHICH IS COMPOSED OF 
    THE HIGH N BITS OF X.  TO DESCRIBE HAIPART MORE PRECISELY, LET
	    (Z X N)  =  (EXPT 2 (- (HAULONG X) N)) 
			        FOR N < (HAULONG X), 
	     	     =  1       OTHERWISE.  
    THEN 
	    (HAIPART X N)  =  (QUOTIENT (ABS X) (Z X N)) 
				 FOR N > 0, 
			   =  (REMAINDER (ABS X) (EXPT 2 (ABS N)))
				 OTHERWISE.
    THUS, A NEGATIVE SECOND ARG RETRIEVES THE "LOWPART" OF X.


A NEW STATUS CALL - (SSTATUS TTYREAD T) CAUSES THE TELETYPE INPUT 
    BUFFERING THAT GOES ON FOR READ TO TERMINATE ONLY WHEN A 
    "TTY-FORCE-FEED" CHARACTER HAS BEEN TYPED.  A TTY-FORCE-FEED 
    CHAR IS CREATED BY OR'ING 1040 (OCTAL) INTO THE CHARACTER'S 
    SYNTAX CATEGORY.  WHEN (STATUS TTYREAD) = NIL, THEN TYPING RUBOUT
    MORE TIMES THAN THERE ARE CHARS IN THE TTY INPUT BUFFER WILL 
    CAUSE AN END-OF-FILE CONDITION.  THIS IS SO THAT USER-SUPPORTED
    READ ROUTINES CAN DO THEIR OWN SUBTLE THING WITH RUBOUT.

ALLOC - JUST A SHORT REVIEW OF THE ANSWERS YOU CAN TYPE 
    AT THE INITIAL QUESTION "ALLOC?":
	  Y, y[LOWER CASE Y], OR ↑S[CONTROL-S] CAUSES ENTRY INTO THE 
	ALLOCATION REQUEST PHASE, WHEREBY THE USER REPLIES BY TYPING
	NUMERICAL VALUES TO THE VARIOUS ALLOCATOR QUESTIONS; AND
	N, n[LOWER CASE N], OR SPACE CAUSES THE STANDARD DEFAULT 
	ALLOTMENT FOR ALL AREAS TO BE TAKEN.  
	  THE STANDARD DEFAULTS ARE PRINTED OUT DURING THE ALLOCATION
	REQUEST PHASE, AND THE USER MAY TYPE SPACE OR CARRIAGE-RETURN 
	TO ACCEPT THE DEFAULT, OR ELSE A STRING OF DIGITS FOLLOWED BY 
	SPACE OR CARRIAGE-RETURN [MEANING AN OCTAL NUMBER], OR ELSE A
	STRING OF DIGITS FOLLOWED BY A DECIMAL-POINT [MEANING A 
	DECIMAL NUMBER].  TYPING RUBOUT DURING THE ALLOCATION REQUEST 
	PHASE CANCELS THE NOT-YET-COMPLETED ANSWER TO THE MOST RECENT 
	QUESTION, AND THE ANSWER MAY BE RETYPED. TYPING ALT-MODE 
	CAUSES THE REMAINING QUESTIONS TO TAKE THE STANDARD ALLOTMENT,
	AND TYPING ↑G[CONTROL-G] CAUSES THE ALLOC PHASE TO RESTART 
	ALL OVER AGAIN WITH THE QUESTION "ALLOC?".
	  ↑S, IN ADDITION, CAUSES THE USERS .LISP. (INIIT) FILE TO BE 
	SELECTED RIGHT AFTER ALLOC'ING.  TYPING ↑Q OR ↑W AT THE 
	"ALLOC?" QUESTION IMMEDIATELY SELECTS THE .LISP. (INIT) FILE,
	AND TAKES ALLOCATION REQUESTS FROM IT BEFORE READING IT IN.
	FOR THIS PURPOSE, THE FIRST EXPRESSION ON THE FILE MUST BE A 
	LIST OF  THE FORM (COMMENT S1 V1 S2 V2 . . . SN VN).  EACH
	S[I] IS ONE OF CORE, FXS, FLS, REGPDL, SPECPDL, FXPDL, FLPDL 
	OR BPS; AND THE ASSOCIATED V[I] IS THE NUMERICAL VALUE 
	INTENDED FOR THAT SPACE.  ANY SPACE NOT SPECIFIED BY THE 
	COMMENT LIST IS ALLOTED THE STANDARD DEFAULT.



COMPLR SWITCHES - FOLLOWING IS A BRIEF TABLE OF THE SWITCHES THAT ONE
    MAY SET WHEN REQUESTING COMPILATION OF A FILE VIA MAKLAP.  EACH 
    SWITCH SETS THE VALUE OF A GLOBAL VARIABLE TO T, AND THE 
    CORRESPONDING SWITCH PRECEEDED BY A MINUS SIGN SETS THE VARIABLE
    TO NIL.  ALL SWITCH VARIABLES ARE INITIALLY NIL.  SWITCHES MAY BE 
    SET EITHER BY DECLARATIONS IN THE USERS SOURCE FILE, OR BY 
    ENCLOSING THE SWITCH LETTERS IN PARENTHESES IN THE MAKLAP COMMAND
    LINE, E.G. "FOO LAP←FOO >(ZN-T)"


 SWITCH   VARIABLE    BRIEF MEANING

    A	  ASSEMBLE    ONLY DO THE ASSEMBLY PHASE ON THE FILE
    D     DISOWNED    DISOWN THE COMPLR AFTER STARTING
    F     FASL        PRODUCE A FASL FILE BY COMPILING THE INPUT INTO
		      LAP, AND THEN ASEMBLING THE LAP [OR 
		      INTERMEDIATE] FILE.
    K     NOLAP       KILL THE INTERMEDIATE LAP FILE
    M     MACROS      OUTPUT MACRO DEFINITIONS INTO THE LAP FILE
    N     NOARGS      DONT OUTPUT ARGS INFORMATION FOR COMPILED 
		      ROUTINES
    S     SPECIAL     AUTO-DECLARE ALL VARIABLES TO BE SPECIAL
    T     TTYNOTES    PUT A NOTE ON JOB CONSOLE AT END OF COMPILING 
		      EACH FUNCTION, AND/OR AT END OF ASSEMBLING 
		      EACH FUNCTION.
    U     UNFASLCOMMENTS  PRODUCE A FILE OF COMMENTS ABOUT THE FASL 
		      ASSEMBLY [2ND FNAME IS UNFASL].
    X     MAPEX       EXPAND ALL MAP CALLS INTO DOS.  TAKES A LITTLE 
		      MORE CODE, BUT CODE THEN RUNS A LITTLE FASTER.
    Z     SYMBOLS     CAUSE SUBROUTINE SYMBOL DEFINITIONS TO BE ADDED
		      TO JOB SYMBOL TABLE AT LOAD TIME.


        

JONL  3/22/73  

1) THE CONTROL CHARACTERS ↑P AND ↑U NO LONGER ARE RELEVANT TO
   THE INTERPRETIVE PLOTTER:  ↑P IS NOT USED, AND ↑U IS NOW USED FOR
   THE PAGEPAUSER DESCRIBED BELOW.  THE PLOTTER MAY BE CLOSED AND 
   RELEASED BY EXECUTING (PLOT 0), AND ANY OTHER PLOTTER REQUEST 
   WILL SIEZE AND OPEN UP THE PLOTTER OF IT IS NOT ALREADY OPEN.

2) (SSTATUS PAGEPAUSE T) WILL TURN ON AN INTERESTING MODE FOR LISP 
   USERS LOGGED IN FROM DISPLAY CONSOLES.  NIL INSTEAD OF T REVERTS 
   TO THE STANDARD MODE.  (STATUS PAGEPAUSE) INTERROGATES THE FLAG.
   (STATUS SYSTEM X) ASSUMES THAT X IS AN ATOM, AND RETURNS A LIST 
   OF PROPERTIES [EXCEPT PNAME] THAT ARE ON THE ATOM AT LISP LOAD 
   TIME.  THUS, SINCE "ALARMCLOCK"  IS A SYSTEM SUBR, AND ALSO A 
   TOP-LEVEL GLOBAL VARIABLE:
	(STATUS SYSTEM 'ALARMCLOCK) = (VALUE SUBR)


3) THREE NEW FUNCTIONS.  IN THE FOLLOWING, LET X AND Y BE 
   PNAME-TYPE ATOMS, AND N BE A FIXNUM:  
    (ALPHALESSP X Y) RETURNS T IF X PRECEEDS Y IN THE ASCII LEXICAL 
		     ORDERING.  NIL OTHERWISE.
    (GETCHAR X N)    RETURNS THE NTH CHARACTER OF THE PNAME OF X.
    (SAMEPNAMEP X Y) RETURNS T IF X AND Y HAVE THE SAME PNAME 
		     [IF (SAMEPNAMEP X Y) = T, AND (EQ X Y) = NIL, 
		     THEN X AND Y CAN'T BOTH BE ON A GIVEN OBARRAY].

4) HASH-CODING. TO FACILITATE HASHCODING SCHEMES FOR S-EXPRESSIONS, 
   THE FUNCTION SXHASH HAS BEEN WRITTEN: (SXHASH FOO) WILL PRODUCE A
   35.-BIT SIGNED INTEGER FOR ANY S-EXPRESSION FOO, AND ANY TWO EQUAL
   EXPRESSIONS WILL SXHASH TO THE SAME NUMBER.  IT WOULD BE A VERY 
   GOOD IDEA FOR USERS WHO WANT TO WRITE THEIR OWN HASHING FUNCTIONS 
   TO DEFINE THEM IN TERMS OF THE RESULTS FROM SXHASH, AND DEFINITELY
   NOT IN TERMS OF THE "POINTER" FOR THE S-EXPRESSION.  FOR EXAMPLE, 
   TO HAVE A TABLE OF S-EXPRESSIONS ONE COULD WRITE:

   (DEFUN KNOWNP (X)
	(PROG (I BKT)
	    (SETQ I (PLUS 76 (REMAINDER (SXHASH X) 77)))	
	      ;THE REMAINDER SHOULD BE REASONABLY RANDOMIZED BETWEEN 
	      ;-76 AND 76, THUS TABLE SIZE MUST BE > 175
	    (SETQ BKT (TABLE I))
	      ;BKT IS THUS A LIST OF ALL THOSE EXPRESSIONS THAT HASH
	      ;INTO THE SAME NUMBER AS DOES X
	    (RETURN (MEMQ X BKT))))

   TO WRITE AN "INTERN" FOR SEXPRESSIONS, ONE COULD THUS DO

    (DEFUN SINTERN (X)
	(PROG (BKT I TEM)
	    (SETQ BKT (TABLE (SETQ I (+ 2N-2 (\ (SXHASH X) 2N-1)))))
		;2N-1 AND 2N-1 STAND FOR A POWER OF 2 MINUS ONE AND 
		;MINUS TWO RESPECTIVELY.  THIS IS A GOOD CHOICE TO 
		;RANDOMIZE THE RESULT OF THE REMAINDER OPERATION
	    (RETURN (COND ((SETQ TEM (MEMBER X BKT)) 
			     (CAR TEM))
			  (T (STORE (TABLE I) (CONS X BKT))
			     X)))))

   SEVERAL INCARNATIONS OF LISP FOLLOW THE "RELOCATING" GARBAGE-
   COLLECTOR STRATEGY, AND IN THESE LISPS THE ADDRESS, OR "POINTER" 
   FOR A GIVEN S-EXPRESSION WILL CHANGE AFTER A GC.  THUS TRYING TO 
   REWRITE KNOWNP AS

    (DEFUN KNOWNP (X)
	(PROG (I II)
	    (SETQ II (SETQ I (\ (MAKNUM X) 2N-1)))
	  A (COND ((EQ (TABLE I) X) (RETURN T))
		  ((< (SETQ I (1+ I)) 2N-1) (GO A)))
	    (SETQ I -1)
	  B (COND ((NOT (< (SETQ I (1+ I)) II)) (RETURN NIL))
		  ((EQ (TABLE I) X) (RETURN T))
		  (T (GO B)))))

   WILL SURELY LEAD TO MUCH GRIEF.

5) IT HAS COME TO MY ATTENTION THAT MANY PERSONS ARE USING THE ERRLIST
   AS A MEANS FOR REDEFINING THE TOP LEVEL FUNCTION.  ONE MUST BE 
   CAREFUL TO PLACE ERRSETS AROUND ANY COMPUTATIONS ON THE ERRLIST 
   THAT MIGHT CONCEIVABLY LEAD TO BOMB-OUT ERRORS, FOR OTHERWISE, 
   THE LISP MAY GET INTO AN INFINITE LOOP OF ERRORS.  TO ENCOURAGE THE
   USE OF THE MACLISP TOPLEVEL FEATURE, THE TOPLEVEL FUNCTION HAS BEEN
   SLIGHTLY REVISED AS FOLLOWS:

    (PROG ()
      B (ERRSET 
	  (PROG ()
		(SETQ ↑R NIL)	;IN ADDITION, MANY OTHER INTERNAL 
				;VARIABLES ARE RESET TO TOP LEVEL 
				;SETTINGS, INCLUDING PDL POINTERS, 
				;FLAGS ETC.
		(MAPC 'EVAL ERRLIST)
		(SETQ * '*)
	      A (SETQ * (COND ((STATUS TOPLEVEL) 
				 (EVAL (STATUS TOPLEVEL)))
			      (T (PRINT *)	;CYCLING THRU THE LOOP
				 (TERPRI)	;IS ESSENTIALLY PRINT 
				 (EVAL (READ))))) ;OF EVAL OF READ
		(GO A)))
	(GO B))		;IF ERROR OCCURS, RESTART AT B INSTEAD OF A



7) SETTING THE VALUE OF THE VARIABLE "SPECIAL" TO NON-NIL IN THE 
   COMPLR WILL CAUSE EVERY VARIABLE TO BE AUTOMATICALLY DECLARED 
   SPECIAL.  THIS WILL TAKE THE HEAT OFF THE POOR LOSER WHO TRIES TO 
   COMPILE SOMEONE ELSE'S PROGRAM WITHOUT ACTUALLY UNDERSTANDING THE
   OTHER'S PROGRAM.     HOWEVER, IT SHOULD BE NOTED THAT SOME 
   REPRESENTATIVE, SAMPLE LISP PROGRAMS HAVE BEEN OBSERVED TO REQUIRE
   40% MORE RUNNING TIME IF COMPILED FOR ALL VARIABLES BEING SPECIAL 
   THAN IF COMPILED WITH JUDICIOUS USE OF SPECIALIZATION.

8) (TYIPEEK T) HAS BEEN SLIGHTLY EXTENDED SO THAT ANY SPLICING MACRO 
   CHARACTERS OCCURING AT TOP-LEVEL READ WILL BE EXECUTED, AND THEN 
   TYIPEEK SCANNING CONTINUED.  THIS IS TO ALLOW MACROS LIKE 
   SEMI-COLON TO DISPOSE OF THEIR COMMENT CHARACTERS, AND IS 
   FAIL-SAFE FOR READ, SINCE READ WOULD ONLY DO THE SAME THING 
   [IE, EXECUTE THE SPLICING MACRO FUNCTION, AND TOSS OUT THE RESULT.]

  


GLS  2/17/73 

THE NEW FASLOAD "XCT HACK" SEEMS TO BE WORKING WELL NOW. (THIS
IS THE HACK WHEREBY CODE TO BE PURIFIED HAS ITS CALLS AND
JCALLS REPLACED BY XCTS WHICH POINT TO THE CALLS, WHICH ARE ALL
COLLECTED INTO A FEW "IMPURABLE" PAGES.) IT WORKS AS FOLLOWS:
WHEN FASLOAD IS INVOKED, IT INSPECTS THE VARIABLE "PURE". IF IT
IS NIL OR UNBOUND A SIMPLE LOAD IS PERFORMED. IF IT IS A NON-NIL
NON-FIXNUM, A NORMAL PURE LOAD IS DONE (ATTEMPTS TO REPLACE
CALLS WITH PUSHJ'S, ETC). IF IT IS A FIXNUM (AND IT MUST BE
BETWEEN 1 AND 8) THEN ONE OF TWO THINGS HAPPEN:
[1] IF THIS IS THE FIRST TIME FASLOAD HAS NOTICED PURE BEING A
    FIXNUM, IT DOES A PAGEBPORG AND THEN GRABS TWO CHUNKS OF
    BINARY PROGRAM SPACE, EACH <VALUE OF PURE> PAGES IN LENGTH.
    THE FIRST IS CALLED "XCT AREA 1" AND THE SECOND (SURPRISE!)
    "XCT AREA 2". THESE TWO AREAS ARE HENCEFORTH, ON THIS AND
    AND SUBSEQUENT FASLOADS, USED FOR THE XCT HACKERY.
[2] IF THESE XCT AREAS HAVE ALREADY BEEN SET UP, THEN FASLOAD
    USES THEM FOR XCT HACKERY.
AS CALLS ARE READ IN, FASLOAD SEARCHES AREA 2 FOR A MATCHING
CALL (USING A HASH SCHEME). IF NONE IS FOUND, THE CALL IS ADDED
TO BOTH AREAS (UNLESS THEY ARE FULL) AND INSTEAD OF LOADING A
CALL INTO BINARY PROGRAM SPACE AN XCT POINTING TO THE CALL IN
AREA 1 IS USED. IF A MATCHING CALL IS FOUND, AN XCT POINTING TO
IT IS USED; THUS MANY XCTS MAY SHARE THE SAME CALL. IF FOR
ANY REASON FASLOAD CAN'T CREATE AN XCT FOR THE CALL (AREA 2 HAS
BEEN PURIFIED (SEE BELOW), AREAS ARE FULL) THEN A NORMAL
PURIFICATION ON THE CALL IS DONE (AS IF PURE=T FOR THAT CALL).
NOW IT IS INTENDED THAT EVENTUALLY AREA 2 WILL BE PURIFIED,
AND AREA 1 LEFT IMPURE. THIS MEANS THAT IF NOUUO=NIL THE CALLS
IN AREA 1 WILL EVENTUALLY BE SMASHED TO PUSHJ'S AND JRST'S, SO
THAT THE XCT'S WILL EXECUTE THE PUSHJ'S ETC. (IF NOUUO=T,
THEN THE EXPECTED THINGS HAPPEN, OF COURSE.) AREA 2 IS USED IN
CASE IT IS DESIRED TO RESTORE AREA 1. (SEE XCTBLT BELOW.)
THE FUNCTION "PURIFY" HAS BEEN ALTERED SO THAT IF AREA 2 IS
EVER PURIFIED (ACTUALLY, IF THE FIRST PAGE OF THAT AREA IS
PURIFIED), THEN A SWITCH IS PERMANENTLY SET SO THAT FASLOAD
CAN STILL CREATE XCTS POINTING TO CALLS ALREADY IN AREA 
(ACTUALLY TO PLACES IN AREA 1 CORRESPONDING TO CALLS IN AREA 2;
THIS WAY IF SOME CALLS HAVE BEEN CLOBBERED IN AREA 1 FASLOAD
CAN STILL FIND THEM), BUT CANNOT PUT NEW CALLS IN THE AREAS
(SINCE DOING THIS WOULD BE A MEMORY VIOLATION). ANY ATTEMPT TO
PUT A NEW CALL IN THE XCT AREAS IS CONVERTED TO A NORMAL
PURIFICATION.
IN CASE IT IS DESIRED TO "UNSMASH" THE CALLS IN AREA 1 (E.G.
TRACING PURPOSES) THE FUNCTION "XCTBLT" OF NO ARGUMENTS IS
PROVIDED. IF NO XCT AREAS EXIST IT RETURNS NIL; OTHERWISE IT
BLT'S AREA 2 INTO AREA 1 AND RETURNS T. (THE NAME OF THIS
FUNCTION IS VARIOUSLY PRONOUNCED "EXECUTE-BLIT", "KSICT-BLIT",
AND (BY STAVROS) "SICK-BLIT". THE FIRST AND THIRD ARE TO BE
CONSIDERED OFFICIAL; USE THE ONE WHICH SHOWS HOW MUCH YOU LIKE
THE FEATURE.)
********* XCTBLT SUPERSEDED BY (SSTATUS UUOLINKS) - 10/15/73 *****
FINALLY, INVOKING (STATUS XCTPG) WILL RETURN SOME INFO ABOUT
THE XCT AREAS: IF NONE HAVE BEEN SET UP, IT RETURNS NIL. IF
THEY HAVE BEEN SET UP, IT RETURNS A 2-LIST; THE FIRST ITEM IS
T/NIL IF AREA 2 HAS/HAS NOT BEEN PURIFIED; THE SECOND IS A
COUNT OF HOW MUCH ROOM IS LEFT IN XCT AREA 2 FOR MORE CALLS
OR WHATEVER.
******** (STATUS XCTPG) REPLACED BY (STATUS UUOLINKS) - 10/15/73 *****
AN EXAMPLE: (** MEANS TYPED BY LOSER, == BY LISP, ; MEANS COMMENTS)
**   (NOUUO NIL)		;NOUUO IS NIL - CAN SMASH CALLS
==   NIL
**   BPORG
==   64000			;BPORG IS 64000
**   (STATUS XCTPG)
==   NIL			;NO XCT AREAS YET
**   (XCTBLT)
==   NIL			;THEREFORE CAN'T BLT THEM
**   (SETQ PURE 2)		;MAKE PURE A FIXNUM TO
==   2				; RESERVE 2 2-PAGE AREAS
**   (FASLOAD COUNT FASL DSK GLS)
==   74056			;56-WORD FILE, PLUS 4 PAGES
**   (STATUS XCTPG)		;COUNT HAS 10 DIFFERENT CALLS,
==   (NIL 3770)			; THUS 3770 WORDS ARE FREE
**   (PAGEBPORG)
==   76000
**   (PURIFY 70000 75777 'BPORG)	;PURIFY COUNT AND XCT
==   70000				; AREA 2
**   (STATUS XCTPG)
==   (T 3770)			;XCT AREA 2 IS NOW PURE, THUS T
**   (COUNT '(A B C))		;TRY COUNT
==   ((A . 1) (B . 1) (C . 1) (NIL . 1))	;OBVIOUSLY IT WORKS
**   (TRACE COUNTX)		;TRACE COUNTX (USED BY COUNT)
==   TRACE 22 LOADING:
==   DONE
==   (COUNTX)
**   (COUNT '(A B C))		;BUT CALL TO COUNTX HAS BEEN 
==   ((A . 1) (B . 1) (C . 1) (NIL . 1))	; SMASHED
**   (XCTBLT)			;BLT BACK CALLS
==   T				;WIN
**   (COUNT '(A B C))		;NOW WE CAN WIN WITH TRACE
==   [TRACE GARBAGE, ETC.]
JONL 2/2/73

FINALLY, THE NEW FASL FORMAT IS IN EFFECT, WITH LISP 229CW.  IT IS 
    AN EXTENDED FORMAT THAT REMOVES THE DIFFICULTIES SOME USERS HAVE
    HAD WITH RANDOM EVALUATIONS IN THE FASL FILE REFERENCEING THE 
    FUNCTIONS DEFINED IN THE FILE.  ALSO, IT ALLOWS VIRTUAL SYMBOL
    DEFINITIONS AT LOAD TIME SO THAT THERE WILL BE NO MORE ANNOYING
    PHASE DIFFERENCES IN ASSEMBLING AND LOADING HAND CODED LAP

THE NEW FUNCTION ODDP EXISTS.  IT REQUIRES A FIXNUM OR BIGNUM AS 
    INPUT, AND ITS ACTION SHOULD BE SELF EXPLANATORY.

MANY LOSERS HAVE FORGOTTEN THE WONDERFUL LSUBR BOOLE:
    ITS FIRST ARG IS A FIXNUM BETWEEN 0 AND 17 WHICH SELECTS ONE OF 
    THE 16. BOOLEAN FUNCTIONS OF TWO BINARY VARIABLES. THIS FUNCTION 
    IS THEN APPLIED SUCCESSIVELY TO THE 36.-BIT VALUES OF THE 
    REMAINING ARGS. THE SELECTED  FUNCTION MAY BEST BE DESCRIBED BY
    A GENERALIZED EXAMPLE.  SUPPOSE THE CALL IS (BOOLE N X Y) AND 
    THE BINARY REPRESENTATION OF N IS ABCD [A,B,C,D ARE ALL BINARY 
    DIGITS]  THEN THE TABLE FOR THE FUNCTION CORRESPONDING TO N IS:

	    ! Y
	    ! 0 1
	----------
	X 0 ! A C
	  1 ! B D

    FROM THIS IT IS EASY TO SEE THAT THE "AND" FUNCTION IS DESIGNATED
    BY 1, "XOR" BY 6, "OR" BY 7, AND THE COMPLEMENT OF ANY FUNCTION
    N BY 17-N; THUS "NAND" IS 17-1=16, "EQUIV" IS 17-6=11, AND 
    "NOR" IS 17-7=10 [ALL NUMBERS IN OCTAL].  
    BY "APPLIED SUCCESSIVELY" IS MEANT THAT (BOOLE N X Y Z) IS THE 
    SAME AS (BOOLE N (BOOLE N X Y) Z).  A FIXNUM CORRESPONDING TO 
    THE 36.-BIT RESULT IS RETURNED.

TYIPEEK IS NOW LSUBR.  IF GIVEN AN NUMERICAL ARGUMENT, IT 
    IS INTERPRETED AS FOLLOWS: 
	A) IF < 200 (OCTAL), THEN SCAN CHARS UNTIL ONE IS INPUT THAT 
	    MATCHES THE VALUE OF ARG. THE NEXT TYI OR READ WILL 
	    THUS ENCOUNTER THAT CHAR.
	B) IF > 777, THEN IS CONSIDRED TO BE A SYNTAX CATEGORY LSH'D
	    NINE PLACES, AND SCANNING IS TO STOP WHEN A CHAR IS 
	    ENCOUNTERED THAT BELONGS TO THAT CATEGORY.
	C) IF ARG IS NOT NUMERIC, THEN T MEANS ASSUME A NUMERICAL 
	    ARGUMENT THAT WILL CAUSE SCANNING TO THE NEXT CHAR WHICH
	    WILL START OUT A READ.  SPLICING MACRO CHARS WILL NOT 
	    START OUT A TOP-LEVEL READ, AND ARE EXECUTED MERELY TO 
	    GIVE THEM A CHANCE TO HAVE ANY APPROPRIATE SIDE-EFFECTS. 
	    SINCE SPACES, CONTROL-CHARACTERS, ETC. WON'T START OUT A
	    READ, THESE ARE SKIPPED OVER UNTIL SOME CHARACTER SUCH AS 
	    PARENTHESIS, LETTER, DIGIT, DECIMAL-POINT, ETC. IS FOUND.

	EXAMPLES: (TYIPEEK 15) SCANS UNTIL CARRIAGE-RETURN IS MET
		  (TYIPEEK 4000←9.) SCANS UNTIL MACRO CHAR IS MET
		  (TYIPEEK)  AS BEFORE, SIMPLY TAKES NEXT CHAR

NEW USER INTERRUPT CONTROL CHARS AVAILABLE:  ↑\ ↑] ↑↑  
    (ASCII VALUES 34 35 AND 36) CORRESPOND TO USER INTERRUPTS 14. 15.
    AND 16.  THERE ARE NO GLOBAL VARIABLES CORRESPONING, SO ONE MUST 
    USE SSTATUS TO SET AND CHANGE THESE INTERRUPTS.

COMPLR HAS YET TWO MORE SWITCHES TO PUT IN COMMAND LINES;
    D IS FOR DISOWNED AND I IS FOR INITIALIZE. SPECIFYING D WILL 
    CAUSE COMPLR TO AUTOMATICALLY DISOWN ITSELF AND COMMIT SUICIDE 
    WHEN COMPILATION IS DONE. THIS SWITCH SHOULD BE USED RATHER
    THAN ANY OTHER METHOD OF DISOWNING SINCE THIS WAY COMPLR WILL 
    KNOW IT IS DISOWNED AND CAN AVOID CERTAIN TYPES OF HACKERY 
    INVOLVING DDT. WHEN COMPLR IS FIRST LOADED THE DEFAULT VALUES OF 
    ALL SWITCHES IS NIL, EXCEPT TTYNOTES (T) AND UNFASLCOMMENTS 
    (U), WHICH ARE INITIALIZED TO T. 

MORE CONTROLS FROM THE STATUS FUNCTIONS.  (SSTATUS TERPRI T)
    WILL SUPPRESS THE GENERATION OF CARRIAGE RETURNS BY THE TYO
    FUNCTION [WHICH ARE NORMALLY PRODUCED WHENEVER THERE IS A 
    RUN OF LINEL OR MORE CHARACTERS WITH OUT A CARRIAGE RETURN]. 
    WHEN BASE = 10., (SSTATUS ← T) WILL PERMIT THE USE OF THE PRINT 
    FORMAT XXX←YY WHEN BASE = 8.  [THIS FORMAT IS AN ESPECIAL WIN FOR 
    LAP OUTPUT IN BASE EIGHT, BUT IS PROBABLY NOT ACCEPTABLE TO 
    THE NUMBER THEORY HACKER]. IN EACH CASE, THE SUPPRESSION-SWITCH 
    MAY BE INTERROGATED WITH STATUS.  INITIAL VALUES ARE NIL FOR 
    TERPRI, AND T FOR ←.

ALARMCLOCK  TWO TYPES OF ALARMCLOCKS ARE AVAILABLE NOW - REAL ELAPSED 
    TIME, AND CPU RUNTIME USED BY JOB IN QUESTION.  FIRST ARG 
    SPECIFIES WHICH TIMER TO USE, AND SECOND ARG SPECIFIES INTERVAL 
    TO WAIT, EXCEPT THAT A NEGATIVE SECOND ARG MEAN SHUT OFF THAT 
    TIMER.   FIRST ARG = "RUNTIME" => WAIT FOR ELAPSED  RUNTIME 
    IN UNITS OF MICROSECONDS;  FIRST ARG = "TIME" => WAIT FOR ELAPSED
    REALTIME IN UNITS OF SECONDS.  SECOND ARG MAY BE EITHER FIXED OR
    FLOATING POINT.  VALUE RETURNED IS T  IF A TIMER WAS JUST SET, 
    AND NIL IF IT WAS TURNED OFF.

THE ARGUMENT TO SLEEP IS NOW IN SECONDS, [MAY BE EITHER FIXED OR 
    FLOATING];  THE RETURN VALUE OF TIME IS A FLOATING POINT 
    NUMBER MEASURED IN SECONDS.  TO OBTAIN THE VALUE OF THE ITS 
    SYSTEM COUNTER [IN UNITS OF 1/30.TH OF A SECOND] DO 
    (FIX (*$ (TIME) 30.0),  WHICH WILL BE ACCURATE TO THE 
    NEAREST FOUR WEEKS.



11/14/72  - JONL - 

THE FASLAP-FASLOAD SCHEME SEEMS TO BE WORKING QUITE WELL NOW, AND
IS DOCUMENTED BELOW ALONG WITH NEW INSTRUCTIONS FOR USING COMPLR.
SEE SECTION 9 BELOW.

0) CERTAIN OPTIONS WITH THE FUNCTIONS STATUS ARE SELDOM USED, BECAUSE 
   THEY EXIST AS INDEPENDENT FUNCTIONS.  HENCE THESE OPTIONS HAVE BEEN
   FLUSHED FROM THE STATUS-SSTATUS SERIES:
	CRUNIT
	GCTWA
	NORET
	NOUUO
	*RSET
	*NOPOINT
	TIME
	RUNTIME
	LISTEN
	GCMIN

1) SOME NEW FUNCTIONS, THAT MIGHT PROVE USEFUL - 
	A) FASLOAD, A FSUBR, EXPECTS AN ARGUMENT LIKE UREAD, AND 
	   RATHER SNAPPILY LOADS IN THE FILE, PROVIDED THAT IT IS 
	   AN FASL FILE [THE OUTPUT OF THE FASLAP ASSEMBLER, NOW 
	   A STANDARD PART OF COMPLR]
	B) BOUNDP PRESUMES A PNAME-TYPE ATOM AS ARGUMENT AND RETURNS
	   A POINTER TO ATOM'S VALUE CELL, IF IT HAS A VALUE CELL,
	   AND IF ITS VALUE CONTAINED THEREIN IS NOT THE SPECIAL
	   SYSTEM "UNBOUND" MARKER.  OTHERWISE, NIL IS RETURNED.
	C) MAKUNBOUND INSURES THAT AN ATOM HAS A VALUE CELL, AND THEN 
	   SETS THE ATOMS VALUE TO THE INTERNAL UNBOUND MARKER.
	D) FRETURN ALLOWS YOU TO RETURN FROM AN ARBITRARY EVALFRAME 
	   [OBTAINED, OF COURSE, BY THE FUNCTION EVALFRAME]. THUS, 
	   WHEN AN ERROR OCCURS, AND THE USER TRACES BACK UP THE PDL 
	   EVENTUALLY FINDING SOME EVALUATION THAT HAS A BUG IN IT, 
	   HE CAN CALL FRETURN WITH FIRST ARGUMENT THE PDL POINTER 
	   FOR THAT FRAME [SEE PRIOR NOTES ON THE USAGE OF FRAMES 
	   IN THE LISP ENVIRONMENT] AND WITH SECOND ARG THE DESIRED 
	   RETURN VALUE FOR THAT EVALUATION.  
	E) THE NUMERICAL SUBROUTINES FORMERLY FOUND ON JONL;NUMSBR > 
	   ARE NOW PART OF THE STANDARD LISP.  THE PURE PART OF THE 
	   SYSTEM CODE NOW HAS ONE WHOLE PAGE DEVOTED TO NUMERICAL 
	   ROUTINES [E.G., PLUS, EXPT, *, ETC].  THE NEW ADDITIONS 
	   ARE SQRT, ISQRT,  SIN, COS, ATAN, LOG, AND EXP, WHICH ARE 
	   ALL FLOATING-POINT FUNCTIONS EXCEPT FOR ISQRT [INTENDED TO 
	   BE "INTEGER" SQUARE ROOT, BUT FOR THE TIME BEING, SIMPLY 
	   FLOATS ITS ARGUMENT, CALLS SQRT, AND FIXES THE RESULT].
	   SIN AND COS ASSUME THE ARGUMENT IS IN RADIANS, AND WILL 
	   GENERATE AN ERROR IF THE ARGUMENT IS TOO LARGE TO MAINTAIN
	   AT LEAST 7 DECIMAL DIGITS OF ACCURACY IS THE ANSWER.  ATAN 
	   REQUIRES TWO ARGS, THE FIRST A DELTA-Y AND THE SECOND A 
	   DELTA-X, AND RETURNS THE ANGLE BETWEEN 0 AND 2*PI WITH 
	   TANGENT (DELTA-Y/DELTA-X).  LOG IS NATURAL LOGARITHM, AND 
	   EXP IS NATURAL ANTI-LOGARITHM [EXPONENTIATION BASE E].
	F) A FEW FUNCTIONS NOW RESIDENT IS THE STANDARD LISP PRIMARILY
	   FOR THE BENEFIT OF LAP, MIGHT CONCEIVABLY BE OF SOME USE TO
	   SOMEONE.  GETMIDASOP EXPECTS A PNAME-TYPE ATOM AND RETURNS 
	   EITHER NIL IF ITS ARG ISN'T A PDP10 INSTRUCTION, OR THE 
	   NUMERICAL VALUE OF THE INSTRUCTION AS A FIXNUM.  IN 
	   ADDITION TO THE STANDARD PDP10 INSTRUCTION SET, THE CALL 
	   UUOS FROM LISP AND THE STRT, ERINT, AND LERR UUOS ARE 
	   DEFINED.  ALSO DEFINED ARE MANY, BUT NOT ALL, OF THE ITS 
	   TIME-SHARING SYSTEM CALLS.  GETDDTSYM ALSO EXPECTS A 
	   PNAME-TYPE ARGUMENT AND INTERROGATES THE JOB SYMBOL TABLE,
	   IF THE JOB'S SUPERIOR IS A DDT WITH A SYMBOL TABLE LOADED
	   IN; NIL IS RETURNED IN THE CONTRARY CASE, AS WELL AS IN 
	   THE CASE THAT THE SYMBOL ISN'T IN THE TABLE. PUTDDTSYM
	   MAKES AN ENTRY INTO THE SYMBOL TABLE - SYMBOL IS FIRST 
	   ARGUMENT, VALUE IS SECOND; RETURNS T IF REQUEST SUCCEDED,
	   AND NIL IF FAILED.


2) IN VIEW OF THE WINNITUDE OF FASLOAD ON FASL FILES, THERE APPEARS 
   TO BE NO REASON TO CONTINUE USING E LAP OR C LAP; RATHER THE USER
   SHOULD SIMPLY DO (FASLOAD F LAP COM) WHICH WILL LOAD IN THE FASL 
   VERSION OF THE LAP ASSEMBLER IN TWO JIFFYS.  IF IN FACT THE USER'S 
   LAP FILE IS SOMETHING THAT GETS ASSEMBLED IN ALMOST EVERY TIME HE 
   LOADS UP A LISP, THEN HE SHOULD CONSIDER ASEMBLING THE FILE WITH 
   FASLAP [SEE ITEM 8 BELOW] AND SIMPLY FASLOADING IN THE FASL 
   VERSION OF THE FILE, RATHER THAN LAPPING IN THE LAP VERSION.


3)  USER INTERRUPT NUMBER ZERO IS NOW AVAILABLE TO THE USER AS AN 
    ORDINARY INTERRUPT FACILITY WHICH IS RUN WHENEVER CONTROL-@ IS 
    STRUCK [OR (IOC @) EVAL'D].  THIS AUGMENTS THE FACILITY FOR 
    INTERRUPTING ON CONTROL-H AND CONTROL-A, CURRENTLY USER INTERRUPTS
    NUMBERS 1 AND 2.  AS NOTED PREVIOUSLY, (STATUS INTERR 1) SIMPLY 
    ACCESSES THE VALUE CELL OF THE ATOM ↑H, WHICH INITIALLY COMES 
    SET THE THE INTERNAL-↑H-BREAK FUNCTION.  THERE IS, HOWEVER, NO 
    ATOM FOR THE OTHER TWO INTERRUPTS.


4) THE SINGLE-CHARACTER-OBJECT HASH TABLE HAS BEEN MERGED INTO A PART 
   OF THE OBARRAY, SO THAT IT WINS COMPLETELY FOR MULTIPLE OBARRAY 
   HACKS.  IF THIS DOESN'T MAKE SENSE TO YOU, DONT WORRY ABOUT IT.  
   ALL YOU NEED TO KNOW IS THAT READCH IS NO MORE COSTLY OR 
   TIME-CONSUMING THAN TYI.

5) DO AND IOG HAVE SLIGHTLY MORE GENERAL FORMATS NOW.
    (IOG C E1 E2 . . . EN) WORKS AS BEFORE, BUT ALL OF E1 TO EN 
   ARE EVALUATED, WITH THE VALUE OF EN BEING RETURNED.
    (DO ((Z INITIALVALUE STEPPERFUN) . . .)
	(ENDTEST E1 E2 . . .EN))
   WORKS LIKE THE USUAL EXTENDED DO FORMAT, EXCEPT THAT THE ENDTEST-
   RETURNVALUE PAIR NOW LOOKS LIKE THE GENERALIZED COND CLAUSE.
*************** YET ANOTHER EXTENSION ON 10/15/73 *********

6) PRINT OUTPUT FOR FIXNUMS HAS BEEN SLIGHTLY HACKED TO GIVE OUT 
   STRINGS SUCH AS 244←33, OR -3←41 WHERE APPLICABLE.  OF COURSE, 
   THESE NUMBERS READ IN PROPERLY, AND SHOULD PROVE TO BE LESS OF A 
   STRAIN ON THE EYES THAN SUCH STRINGS AS 344000000000 [OR IN 
   BASE 10., 228.←27. RATHER THAN 30601641984.]  

7) GRABBING A DISPLAY SLAVE, WITH DISINI, NOW CAUSES A MESSAGE TO BE
   PRINTED ON THE JOB CONSOLE REGARDING WHICH COMPUTER S ACTUALLY 
   RUNNING THE SLAVE.  ORDINARILY, THE PDP6 IS PREFERRED, BUT IF IT 
   IS UNAVAILABLE, OR IF IT IS NOT RUNNING, THE USER IS INFORMED.

8) THERE IS NO LONGER ANY DIFFICULTY WITH COMPILING AN EXPR OF MORE 
   THAN 5 ARGUMENTS.  COMPLR CURRENTLY WILL CONVERT SUCH AN EXPR 
   INTO AN LSUBR WITH NO LOSS OF EFFICIENCY.  SIMILARLY, THERE IS NO
   LIMITATION ON THE NUMBER OF VARIABLES IN A LAMBDA APPLICATION.

9) WHEN COMPLR IS LOADED, MAKLAP HAS BEEN ENTERED.
   TYPING CONTROL-G WILL GET ONE BACK TO LISP TOP LEVEL.  
   A COMMAND TO MAKLAP IS OF THE FORM
   <TARGET-FILE-DESIGNATOR>←<SOURCE-FILE-DESIGNATOR><CARRIAGE-RETURN>
   OR OF THE FORM
   <SOURCE-FILE-DESIGNATOR><CARRIAGE-RETURN>
   IN THIS CASE THE TARGET FILE WILL BE DEFAULTED TO BE JUST LIKE 
   THE SOURCE FILE, EXCEPT THAT THE SECOND FILE NAME WILL BE "LAP" 
   FOR COMPLR OUTPUT, AND "FASL" FOR FASLAP OUTPUT [IF THERE IS ANY]
      THERE IS ALSO A NEW WAY TO SET CERTAIN COMPILE-TIME SWITCHES:
   IN THE COMMAND LINE TO MAKLAP, ONE CAN ENCLOSE CERTAIN SWITCH
   DESIGNATORS IN PARENTHESES AS FOLLOWS
   FOO LAP1←JONL;FOO BAR(N -M S)
   EACH LETTER WITHIN  PARENTHESES SETS A SWITCH FROM ITS NORMAL NIL
   STATE TO NON-NIL;  USING A "-" BEFORE THE LETTER SETS IT
   BACK TO NIL.  FOLLOWING IS A LIST OF THE CURRENT SWITCHES AND
   THEIR MEANINGS:
     N	NOARGS	DONT OUTPUT THE ARGS INFORMATION
     X	MAPEX	EXPAND ALL MAPS INTO CORRESPONDING DOS
     M	MACROS	PRINT INTO THE OUTPUT FILE ANY MACRO DEFINITIONS
     S	SYMBOLS	OUTPUT SYMBOLS REQUESTS TO LAP [SO THAT THE LAP
   		SYMBOLS ARE ENTERED IN THE DDT SYMBOL TABLE]
     F	FASL	AFTER COMPILATION, ASSEMBLE THE LAP FILE INTO A FASL 
		FILE [AND INCIDENTALLY PRODUCING AN UNFASL FILE]
     K	NOLAP	KILL THE IMTERMEDIATE LAP FILE AFTER PRODUCTION OF 
   		THE FASL FILE
     A	ASSEMBLE	DO THE ASSEMBLE PHASE ONLY - MEANS THAT INPUT
   		FILE IS A LAP SOURCE,, AND OUTPUT IS A FASL FILE.
     U	UNFASLCOMMENTS	PRINT FASLAP COMMENTS, WARNING MESSAGES, 
		AND SOURCE FILE COMMENTS  LIKE (COMMENT FOO BAR) 
		AND (QUOTE (FOO BAR)) ON THE UNFASL FILE.
     T  TTYNOTES	HAVE COMPLER PRINT ON THE JOB CONSOLE AN 
		ANNOTATION AFTER SUCCESSFUL COMPILATION OF EACH 
		FUNCTION.  LIKEWISE FOR FASLAP ASSEMBLIES.

   SPACES,TABS, CARRIAGE RETURNS, AND LINE FEEDS BETWEEN THE SWITCH 
   DESIGNATORS ARE IGNORED;  THE REQUEST MAY APPEAR ANYWHERE IN THE 
   COMMAND LINE.
	AT TIMES, COMPLR AND FASLAP WILL WISH TO INFORM THE USER OF 
   ERRONEOUS, OR POSSIBLY ERRONEOUS CODE IN HIS FILE [OR, HORRORS, A 
   BUG IN COMPLR OR IN FASLAP].  THESE WARNINGS, OR ERROR MESSAGES 
   ARE PRINTED OUT UNDER AN IOG MODIFIED BY THE REQUESTS FROM A 
   TOP-LEVEL LIST "MESSIOC".  NORMALLY MESSIOC IS NIL, SO THAT WARNING
   MESSAGES GO ONLY TO THE JOB CONSOLE, BUT IF THE USER DOES 
   (MESSIOC FOO), IT WILL HAVE THE EFFECT OF CAUSING AN (IOC FOO) 
   JUST BEFORE THE PRINTING OF THE MESSAGE.  MESSIOC CAN BE CALLED 
   EITHER FROM A ↑H BREAK IN THE COMPLR, OR FROM COMPLR TOP LEVEL 
   BEFORE ENTERING MAKLAP, OR IN A DECLARATION ON THE FILE TO BE 
   COMPILED.
	LAP SOURCE CODE MAY STILL BE ASSEMBLED AND LOADED IN BY 
   LAP, BUT IT THE ASSEMBLY IS DONE ONTO DISK [INTO A FASL FILE], 
   THEN THE FASLOAD WILL BE MUCH QUICKER THAN A FULL ASSEMBLY AND 
   LOAD.  FOR ONE SHOT ASSEMBLY-AND-LOAD TASKS, IT IS STILL MUCH 
   FASTER, HOWEVER, SIMPLY FASLOAD IN COM:F LAP AND ASSEMBLE THE 
   FILE IN CORE [OR LOAD IN COM:E LAP IF FOR SOME REASON AN EXPR 
   VERSION OF LAP IS DESIRED]  -  ONE GAINS IF HE INTENDS TO 
   ASSEMBLE ONCE AND LOAD-IN MANY TIMES.
	ONE MAIN ADVANTAGE OF FASLOADING OVER SIMPLY UREADING THE 
   ORIGINAL FILE AND LOADING IS THAT THE READER IS BYPASSED.  THE 
   READ PHASE OF LOADING IN AN AUXILLIARY FILE IS QUITE SLOW, AND 
   THE FASL FILE HAS LIST STRUCTURE STORED IN IT IN A PRE-PARSED 
   FORM THAT ALLOWS QUICK RECONSTRUCTION.  SOME USERS MAY HAVE TO 
   GIVE THIS A LITTLE THOUGHT, HOWEVER, FOR IT MEANS THAT RANDOM 
   EVALUATIONS INITIATED DURING FASLOADING CANNOT EXPECT TO CALL 
   THE FUNCTION READ AND GOBBLE UP THE NEXT FEW CHARACTERS FROM 
   THE "INPUT FILE"; ALSO, THERE WILL BE NO READ-MACRO CHARACTER 
   HAPPENINGS DURING THE FASLOADING PHASE.


8/9/72   JONL  

1) SOME NEW STATUS CALLS
    A) (STATUS LISPVERSION) IS NOW NECESSARY, INSTEAD OF THE
	PREVIOUS DOCUMENTATION THAT SUGGESTED THAT THE VALUE OF THE
	ATOM LISPVERSION WOULD BE A PNAME-TYPE ATOM COMPRISED OF THE 
	CHARACTERS OF THE SECOND FILE NAME OF THE
	VERSION OF LISP USED TO CREATE THE RUNNING LISP.
    C) (STATUS UNAME) LETS YOU KNOW WHAT NAME YOU LOGGED IN UNDER 
	[MORE OR LESS]
    C) (STATUS JCL) OBTAINS AS A LIST OF SINGLE-OBJECT
	CHARACTERS THE JOB COMMAND LINE FROM DDT, IF THERE IS
	ONE, AND NIL OTHERWISE.  USEFUL FOR CREATING SYSTEMS
	THAT COULD TAKE AN ARGUMENT FROM DDT.  E.G. COMPLR
	NOW USES THIS FEATURE SO THAT THE CHARACTERS  OF THE JCL
	ARE FED TO MAKLAP JUST AS YOU WOULD TYPE THEM AFTER CALLING
	(MAKLAP).  THUS :COMPLR MOBY MESS
	IS ACCEPTABLE, AND WOULD COMPILE THE FILE MOBY MESS INTO 
	MOBY LAP ON THE DSK DIRECTORY OF THE  CURRENT SNAME 
    D) (STATUS CHRCT NIL), (STATUS LINEL NIL), (SSTATUS CHRCT NIL N), 
	AND (SSTATUS LINEL NIL N)  ARE IMPLEMENTED FOR COMPATIBILITY 
	WITH NLISP TO, TEST AND SET THE VALUES OF THE LINEL AND 
	CHARACTER COUNTER FOR THE TTY CHANNEL.
     E) (SSTATUS GCTIME NEWVALUE) IS NOT REALLY NEW, BUT WILL NOW 
	RETURN THE VALUE OF THE GCTIME COUNTER AS IT FOUND IT BEFORE 
	THE SETTING OF A NEW VALUE.  WORKS LIKE 
	(PROG2 NIL (STATUS GCTIME) (SSTATUS GCTIME NEWVALUE))

2) SOME NEW FUNCTIONS AND FEATURES FOR HACKING PDL FRAMES:
    A) EVALFRAME IS THE SAME FUNCTION  AS PDLFRAME, BUT I WOULD LIKE 
	TO SEE THE NAME "PDLFRAME" PHASED OUT, SINCE THE FRAME 
	RETURNED BY THIS FUNCTION IS FOR AN MARKED ENTRY TO EVAL.
	IF (*RSET T) HAS BEEN DONE, THE UPON ENTRY TO EVAL A SMALL 
	STACK OF ITEMS IS PUSHED ON THE REGULAR PDL;  THE FIRST 
	ELEMENT OF THE RETURND VALUE IS A PDL POINTER TO THE 
	BEGININING OF THIS STACK, AND HENCE JUST ONE PDL SLOT 
	BEYOND THE PDL POSITIONUPON THE ENTRYTO EVAL.
	[SEE NOTE OF 5/3/72, SECTION 7]
    B) ERRFRAME RETURNS A 3-LIST SIMILAR TO EVALFRAME, WHERE THE FIRST
	IS ELEMENT IS A PDL POINTER TO THE BEGINNNG OF THE STACK OF 
	GOODIES PUSHED ONTO THE PDL WHEN THE ERROR OCCURS; AND THE 
	SECOND ELEMENT IS AN ATOM COMPRISED OF THE CHARACTERS OF THE 
	MAIN PART OF THE ASSOCIATED ERROR MESSAGE.
    C) BOTH OF THE ABOVE FUNCTIONS NOW ACCEPT AN ARGUMENT WHICH SHOULD
	BE A PDL POINTER [I.E., A NEGATIVE FIXNUM IN THE APPROPRIATE
	RANGE], OR NIL MEANING THE PRESENT PDL POSITION, AND THE 
	INTENT IS TO START SEARCHING FOR THE FIRST ASSOCIATED STACK 
	OF GOODIES  [AN ERROR MARK FOR ERRFRAME, AND EVAL MARK FOR 
	EVALFRAME] PRIOR TO THAT PDL POINT.  HOWEVER, SOMETIMES WHEN 
	SEARCHING THE STACK, ONE GOES BACK TOO FAR, AND WOULD LIKE 
	TO SEARCH FORWARDS; THUS IF A LARGE POSITIVE FIXNUM IS GIVEN
	AS ARGUMENT, THEN IT IS ASSUMEND TO BE THE NEGATION OF
	SOME PDL POINTER, WHICH IT THEN USES TO START SEARCHING
	FORWARDS.  SIMILARLY, IF ZERIO IS GIVEN AS ARGUMENT, A 
	FORWARDS SEARCH IS INITIATED AT THE PDL BEGINNING [BOTTOM].
    D) BOTH BAKTRACE AND BAKLIST NOW ALLOW AN OPTIONAL ARGUMENT WHICH 
	IS INTERPRETED AS ABOVE FOR THE ARGUMENT TO EVALRFRAME AND 
	ERRFRAME.  HOWEVER, THERE IS NO SEARCH PHASE INVOLVED, AND 
	THE PRINTING, (OR BAKLISTING) ALWAYS PROCEEDS BACK UP THE PDL.

3) NVID AND NVFIX NOW RETURN 16384.0 AND 16384. [OCTAL 40000] ON THE 
	CONDITIONS OF DIM CUT OFF AND COUNTER UNDERFLOW.

4) ARGS IS NOW AN LSUBR.  GIVEN TWO ARGUMENTS, THE FIRST IS AN ATOM 
	ONTO WHICH AN ARGS PROPERTY IS TO BE PUT, AND THE SECOND IS 
	THE ARGS PROPERTY [WHICH WILL BE PLACED JUST BEFORE THE 
	PNAME PROPERTY].  A PREVIOUS NOTE DESCRIBES THE STRUCTURE OF 
	THE ARGS PROPERTY.  TO SAFEGUARD YOUR PROGRAMS AGAINST
	THE VAGARIES OF FUTURE CHANGES IN THE IMPLEMENTATION OF THIS 
	FEATURE,  OR THE VAGARIES OF RUNNING UNDER MACLISP ON ANOTHER 
	COMPUTER, ONE SHOULD NOT USE (GET FOO 'ARGS), BUT RATHER 
	(ARGS FOO);  THIS LATER FORM ALLOWS FOR STORING THE ARGS 
	PROPERTY IS SOME MORE EFFICIENT FASHION THAN ON THE ATOM'S 
	PROPERTY LIST.


5) AS IT NOW OPERATES, LAP IS AN IN CORE ASSEMBLER AND RELOCATOR.
    THERE WILL SOON BE AN OPTIONAL VERSION THAT WILL ASSEMBLE A LAP 
    SOURCE FILE INTO A LAP RELOCATABLE FORMAT, WHICH A LINKING-LOADER
    VERSION OF LAP WILL BE ABLE TO LOAD IN.  WE EXPECT A CONSEQUENT 
    SAVINGS IN TIME WHEN THE LAP LINKING LOADER IS USED ON THE RELOC 
    FILE, AS OPPOSED TO USING THE LAP PROGRAM ON THE SOURCE FILE.


  08/01/72  - GLS -

THE LISP TRACE PACKAGE CONSISTS OF THREE MAIN FUNCTIONS,
TRACE, UNTRACE, AND REMTRACE, ALL OF WHICH ARE FEXPRS.

A CALL TO TRACE HAS THE FOLLOWING FORM:
	(TRACE <TRACE SPECS>)
A "TRACE SPEC" IN TURN IS EITHER AN ATOM (THE NAME
OF THE FUNCTION TO BE TRACED) OR A LIST OF THIS FORM:
	(<FUNCTION NAME> <OPTIONS>)
WHERE THE OPTIONS ARE AS FOLLOWS:

BREAK <PRED>    CAUSES A BREAK AFTER PRINTING THE ENTRY
		TRACE (IF ANY) BUT BEFORE APPLYING THE
		TRACED FUNCTION TO ITS ARGUMENTS, IF
		AND ONLY IF <PRED> EVALUATES TO NON-NIL. 

COND <PRED>     CAUSES TRACE INFORMATION TO BE PRINTED
		FOR FUNCTION ENTRY AND/OR EXIT IF AND
		ONLY IF <PRED> EVALUATES TO NON-NIL.

ENTRYCOND <PRED> CAUSES TRACE INFORMATION TO BE PRINTED FOR
		FUNCTION ENTRY IF AND ONLY IF <PRED> EVALUATES TO
		NON-NIL. IF BOTH COND AND ENTRYCOND ARE USED, THE
		<PRED> SPECIFIED FOR COND IS EVALUATED FIRST; AND
		BOTH <PRED>'S MUST EVALUATE TO NON-NIL FOR
		ENTRY TRACE INFORMATION TO BE PRINTED. IS THE
		<PRED> FOR COND EVALUATES TO NIL, THEN THE <PRED> FOR
		ENTRYCOND WILL NOT BE EVALUATED.

EXITCOND <PRED>	CAUSES TRACE INFORMATION TO BE PRINTED FOR
		FUNCTION EXIT IF AND ONLY IF <PRED> EVALUATES TO
		NON-NIL. IF BOTH COND AND EXITCOND ARE USED, BOTH MUST
		EVALUATE TO NON-NIL FOR EXIT TRACE INFORMATION TO BE
		PRINTED. NOTE THAT THE <PRED> FOR COND IS
		NOT RE-EVALUATED ON EXIT; RATHER, ITS VALUE ON ENTRY
		IS SAVED. IF THIS VALUE IS NIL, THEN THE <PRED>
		FOR EXITCOND WILL NOT BE EVALUATED.

WHEREIN <FN>    CAUSES THE FUNCTION TO BE TRACED ONLY
		WHEN CALLED FROM THE SPECIFIED FUNCTION.
		ONE CAN GIVE SEVERAL TRACE SPECS TO TRACE,
		ALL SPECIFYING THE SAME FUNCTION BUT WITH
		DIFFERENT WHEREIN OPTIONS, SO THAT THE
		FUNCTION IS TRACED IN DIFFERENT WAYS WHEN
		CALLED FROM DIFFERENT FUNCTIONS. NOTE THAT
		IF THE FUNCTION SPECIFIED BY THE WHEREIN
		OPTION IS ALREADY BEING TRACED ITSELF, THE
		WHEREIN OPTION PROBABLY WILL NOT WORK AS
		DESIRED, PROBABLY. (THEN AGAIN, IT MIGHT.)  
		NOTE THAT <FN> MUST BE AN INTERPRETED FUNCTION,
		SINCE THE WHEREIN TRACE INVOLVES ALTERING
		THE CALLING FUNCTION AS WELL AS THE CALLED.

ARGPDL <PDL>    SPECIFIES AN ATOM <PDL> WHOSE VALUE TRACE
		INITIALLY SETS TO NIL. WHEN THE FUNCTION IS
		TRACED, A LIST OF THE CURRENT RECURSION
		LEVEL FOR THE FUNCTION, THE FUNCTION'S
		NAME, AND A LIST OF THE ARGUMENTS IS CONSED
		ONTO THE <PDL> WHEN THE FUNCTION IS ENTERED,
		AND CDR'ED BACK OFF WHEN THE FUNCTION IS
		EXITED. (ACTUALLY, THIS CONSING/CDRING IS DONE BY
		MEANS OF LAMBDA-BINDING, SO THAT IF AN ERROR OR
		OTHER INTERRUPT OCCURS THE <PDL> WILL BE RESET BY
		UNBINDING.) THE <PDL> CAN BE INSPECTED FROM A
		BREAKPOINT, FOR EXAMPLE, AND USED TO
		DETERMINE THE VERY RECENT HISTORY OF THE
		FUNCTION. THIS OPTION CAN BE USED WITH OR
		WITHOUT PRINTED TRACE OUTPUT. EACH FUNCTION
		CAN BE GIVEN ITS OWN PDL, OR ONE PDL MAY
		SERVE SEVERAL FUNCTIONS. 

ENTRY <LIST>    SPECIFIES A LIST OF ARBITRARY S-EXPRESSIONS
		WHOSE VALUES ARE TO BE PRINTED ALONG WITH
		THE USUAL ENTRY TRACE. THE LIST OF
		RESULTANT VALUES, WHEN PRINTED, IS PRECEDED
		BY A \\ TO SEPARATE THEM FROM THE OTHER
		INFORMATION.

EXIT <LIST>     SIMILAR TO ENTRY, BUT SPECIFIES EXPRESSIONS
		WHOSE VALUES ARE PRINTED WITH THE EXIT TRACE.
		AGAIN, THE LIST OF VALUES PRINTED
		IS PRECEDED BY \\.

ARG     	SPECIFY THAT THE FUNCTION'S ARGUMENTS,
VALUE		RESULTANT VALUE, BOTH, OR NEITHER ARE TO
BOTH		BE TRACED. IF NOT SPECIFIED, THE DEFAULT
NIL		IS BOTH. ANY "OPTIONS" FOLLOWING ONE OF
		THESE FOUR ARE ASSUMED TO BE ARBITRARY
		S-EXPRESSIONS WHOSE VALUES ARE TO BE PRINTED
		ON BOTH ENTRY AND EXIT TO THE FUNCTION.
		HOWEVER, IF ARG IS SPECIFIED, THE VALUES ARE
		PRINTED ONLY ON ENTRY, AND IF VALUE, ONLY ON
		EXIT. NOTE THAT SINCE ARG, VALUE, BOTH, NIL,
		SWALLOW ALL FOLLOWING EXPRESSIONS FOR THIS
		PURPOSE, WHICHEVER ONE IS USED SHOULD BE THE
		LAST OPTION SPECIFIED. ANY SUCH VALUES
		PRINTED WILL BE PRECEDED BY A // AND WILL
		FOLLOW ANY VALUES SPECIFIED BY ENTRY OR EXIT
		OPTIONS.


IF THE VARIABLE ARGLIST IS USED IN ANY OF THE EXPRESSIONS
GIVEN FOR THE COND, BREAK, ENTRY, EXIT, OR AFTER-THE-ARG-
VALUE-BOTH-OR-NIL OPTIONS, WHEN THOSE EXPRESSIONS ARE
EVALUATED THE VALUE OF ARGLIST WILL EFFECTIVELY BE A LIST
OF THE ARGUMENTS GIVEN TO THE TRACED FUNCTION. THUS
	(TRACE (FOO BREAK (NULL (CAR ARGLIST))))
WOULD CAUSE A BREAK IN FOO IFF THE FIRST ARGUMENT TO
FOO IS NIL. SIMILARLY, THE VARIABLE FNVALUE WILL EFFECTIVELY
BE THE RESULTING VALUE OF THE TRACED FUNCTION; SINCE THE VALUE
OF THE FUNCTION IS OF COURSE AVAILABLE ONLY ON EXIT
FROM THE FUNCTION, THIS SHOULD ONLY BE USED WITH THE EXIT AND
EXITCOND OPTIONS. ALSO, THE VARIABLE RECURLEV, ON BOTH ENTRY AND
EXIT, WILL EFFECTIVELY HAVE AS ITS VALUE A NUMBER INDICATING THE
CURRENT RECURSION LEVEL (AS WOULD BE PRINTED BY TRACE). THIS
ALLOWS CONDITIONAL BREAKS AND TRACES BASED ON THE DEPTH
OF RECURSION. THE RECURSION LEVEL IS INCREMENTED BY MEANS OF
LAMBDA-BINDING; THUS IF AN ERROR OR OTHER INTERRUPT OCCURS,
THE RECURSION LEVEL WILL BE RESET BY UNBINDING.
(NOTE THAT THE WORD "EFFECTIVELY" IS USED IN DESCRIBING THE
VALUES OF THE ABOVE "VARIABLES" SINCE THESE VARIABLES ARE
NOT ACTUALLY USED; TRACE ACTUALLY PERFORMS A SUBLIS ON THE
EXPRESSIONS FOR THE OPTIONS MENTIONED ABOVE, SUBSTITUTING
CERTAIN NON-INTERNED ATOMS FOR ANY AND ALL APPEARANCES OF
THE SPECIAL "VARIABLES" MENTIONED ABOVE. THEREFORE, DO
NOT TRY TO USE THESE VARIABLES FOR ANYTHING BUT OBTAINING
THEIR VALUES WHEN USING THEM IN EXPRESSIONS FOR THE ABOVE
OPTIONS.)

IN ADDITION TO USING THE VARIABLE ARGLIST, EXPRESSIONS
FOR TRACE OPTIONS MAY REFER TO THE ACTUAL NAMES OF
THE FUNCTION'S ARGUMENTS IF THE FUNCTION IS INTERPRETED RATHER
THAN COMPILED. FURTHERMORE, SUCH ARGUMENT VARIABLES MAY
BE EXAMINED FROM BREAKPOINTS.

 
THERE EXISTS A VERSION OF THE TRACE PACKAGE
CALLED STRACE. IT LOOKS EXACTLY LIKE THE NORMAL TRACE PACKAGE,
EXCEPT THAT ONE EXTRA OPTION IS AVAILABLE:

GRIND		SPECIFIES THAT ANY TRACE OUTPUT IS TO BE DONE,
		NOT WITH THE USUAL CALL TO PRINT, BUT THROUGH THE
		SPRINT FUNCTION FROM THE GRIND PACKAGE; THUS, TRACE
		OUTPUT FOR THAT <TRACE SPEC> WILL BE "PRETTY-PRINTED".

THIS FEATURE IS NOT INCLUDED IN THE REGULAR TRACE PACKAGE
BECAUSE IT REALLY EATS UP FREE STORAGE.



EXAMPLES OF CALLS TO TRACE:

[1] TO TRACE FUNCTION FOO, PRINTING BOTH ARGUMENTS ON ENTRY
AND RESULT ON EXIT:
	(TRACE FOO)  OR  (TRACE (FOO))  OR  (TRACE (FOO BOTH)).

[2] TO TRACE FUNCTION FOO ONLY WHEN CALLED FROM FUNCTION BAR,
AND THEN ONLY IF (CDR X) IS NIL:
	(TRACE (FOO WHEREIN BAR COND (NULL (CDR X))))
     OR (TRACE (FOO COND (NULL (CDR X)) WHEREIN BAR)).
AS THIS EXAMPLE SHOWS, THE ORDER OF THE OPTIONS MAKES NO
DIFFERENCE, EXCEPT FOR ARG, VALUE, BOTH, OR NIL, WHICH MUST
BE LAST.

[3] TO TRACE FUNCTION QUUX, PRINTING THE RESULTANT VALUE
ON EXITING BUT NO ARGUMENTS ON ENTRY, PRINTING THE VALUE
OF (CAR X) ON ENTRY, OF FOO1, FOO2, AND (FOO3 BAR) ON EXIT,
AND OF ZXCVBNM AND (QWERTY SHRDLU) ON BOTH ENTRY AND EXIT:
	(TRACE (QUUX ENTRY ((CAR X)) EXIT (FOO1 FOO2 (FOO3 BAR))
		VALUE ZXCVBNM (QWERTY SHRDLU))).

[4] TO TRACE FUNCTION FOO ONLY WHEN CALLED BY FUNCTIONS BAR
AND BAZ, PRINTING ARGS ON ENTRY AND RESULT ON EXIT, PRINTING
THE VALUE OF (QUUX BARF BARPH) ON EXIT FROM FOO WHEN CALLED
BY BAZ ONLY, AND CONDITIONALLY BREAKING WHEN CALLED BY BAR IF
A EQUALS B:
	(TRACE (FOO WHEREIN BAR BREAK (EQUAL A B))
		(FOO WHEREIN BAZ EXIT ((QUUX BARF BARPH)))).

[5] TO TRACE FUNCTIONS PHOO AND FU, NEVER PRINTING ANYTHING
FOR EITHER, BUT SAVING ALL ARGUMENTS FOR BOTH ON A COMMON PDL
CALLED FOOPDL, AND BREAKING INSIDE PHOO IF X IS NIL:
	(TRACE (PHOO ARGPDL FOOPDL BREAK (NULL X) COND NIL NIL)
		(FU ARGPDL FOOPDL COND NIL NIL)).
THE "COND NIL" PREVENTS ANYTHING AT ALL FROM BEING PRINTED.
THE SECOND NIL IN EACH <TRACE SPEC> SPECIFIES THAT NO ARGS
OR VALUE ARE TO BE PRINTED; ALTHOUGH THE COND NIL WOULD
PREVENT THE PRINTOUT ANYWAY, SPECIFYING THIS TOO PREVENTS
TRACE FROM EVEN SETTING UP THE MECHANISMS TO DO THIS (WHICH
IT WOULD, AGAINST THE POSSIBILITY THAT SOMEDAY NIL MIGHT NOT
EVALUATE TO NIL.)

[6] TO TRACE FUNCTION FOOBAR, PRINTING ARGS ON ENTRY AND
RESULT ON EXIT, PLUS THE VALUE OF MOBY-EXPR ON EXIT, AND
PRETTY-PRINTING THE OUTPUT:
	(TRACE (FOOBAR GRIND EXIT (MOBY-EXPR))).

[7] TO TRACE FUNCTION GHOTI, ONE OF WHOSE ARGUMENTS IS
FISH, PRINTING ALL ARGUMENTS ONLY IF FISH
IS NON-NIL, AND PRINTING ON EXIT ONLY IF THE RESULT IS NOT
A NUMBER:
	(TRACE (GHOTI ENTRYCOND FISH
		      EXITCOND (NOT (NUMBERP FNVALUE)))).

[8] TO TRACE FUNCTION SSEHC, PRINTING TRACE OUTPUT ONLY IF
DRAOB IS NON-ATOMIC, AND EVEN THEN ON ENTRY ONLY IF POHSIB IS
A NEGATIVE NUMBER, BREAKING WHEN THE RECURSION LEVEL IS EITHER
3 OR GREATER THAN 7:
	(TRACE (SSEHC COND DRAOB
		      ENTRYCOND (AND (NUMBERP POHSIB) (MINUSP POHSIB))
		      BREAK (AND NEEUQ (OR (EQUAL RECURLEV 3)
					   (LESSP 7 RECURLEV))))).


TRACE RETURNS AS ITS VALUE A LIST OF NAMES OF ALL FUNCTIONS
SET TO TRACE; FOR ANY FUNCTIONS TRACED WITH THE WHEREIN
OPTION, SAY (TRACE (FOO WHEREIN BAR)), INSTEAD OF RETURNING
JUST THE NAME IT RETURNS A 3-LIST (FOO WHEREIN BAR).
IF TRACE FINDS A <TRACE SPEC> IT DOESN'T LIKE, INSTEAD OF THE
FUNCTION'S NAME IT RETURNS A LIST WHOSE CAR IS ? AND WHOSE
CDR INDICATES WHAT TRACE DIDN'T LIKE. (THIS SHOULD BE SLIGHTLY
MORE HELPFUL THAN THE OOLD TRACE, WHICH SIMPLY RETURNED NIL.)
A LIST OF POSSIBLE ERROR INDICATIONS:

(? WHEREIN FOO)     TRACE COULDN'T FIND AN EXPR, FEXPR, OR
		    MACRO PROPERTY FOR THE FUNCTION SPECIFIED BY THE
		    WHEREIN OPTION; OR THE FUNCTION SPECIFIED WAS NOT
		    ATOMIC.

(? ARGPDL FOO)      THE ITEM FOLLOWING THE ARGPDL OPTION WAS
		    NOT A NON-NIL PNAME-TYPE ATOM.

(? FOO NOT FUNCTION) INDICATES THAT THE FUNCTION SPECIFIED
		    TO BE TRACED WAS NON-ATOMIC, OR HAD NO FUNCTIONAL
		    PROPERTY. (VALID FUNCTIONAL PROPERTIES ARE EXPR,
		    FEXPR, SUBR, FSUBR, LSUBR, AND MACRO.)

(? FOO)		    FOO IS NOT A VALID OPTION.

THUS A CALL TO TRACE SUCH AS
	(TRACE (FOO WHEREIN (NIL)) (BAR ARGPDL NIL))
WOULD RETURN, WITHOUT SETTING UP ANY TRACES,
	((? WHEREIN (NIL)) (? ARGPDL NIL)).

IF YOU ATTEMPT TO SPECIFY TO TRACE A FUNCTION ALREADY
BEING TRACED, TRACE CALLS UNTRACE BEFORE SETTING UP THE NEW
TRACE. IF AN ERROR OCCURS, CAUSING (? <RANDOM>) TO BE
RETURNED, THE FUNCTION FOR WHICH THE ERROR OCCURRED MAY OR
MAY NOT HAVE BEEN UNTRACED. BEWARE!

IT IS POSSIBLE TO CALL TRACE WITH NO ARGUMENTS. (TRACE)
RETURNS AS ITS VALUE A LIST OF ALL FUNCTIONS CURRENTLY
BEING TRACED.




UNTRACE IS USED TO UNDO THE EFFECTS OF TRACE AND RESTORE
FUNCTIONS TO THEIR NORMAL (?) UNTRACED STATE. THE ARGUMENT
TO UNTRACE FOR A GIVEN FUNCTION SHOULD BE ESSENTIALLY WHAT
TRACE RETURNED FOR IT; I.E. IF TRACE RETURNED FOO, USE
(UNTRACE FOO); IF TRACE RETURNED (FOO WHEREIN BAR) USE
(UNTRACE (FOO WHEREIN BAR)). UNTRACE WILL TAKE MULTIPLE
UNTRACE SPECIFICATIONS, E.G. (UNTRACE FOO QUUX (BAR 
WHEREIN BAZ) FUPHOO). CALLING UNTRACE WITH NO ARGUMENTS
WILL UNTRACE ALL FUNCTIONS CURRENTLY BEING TRACED.



REMTRACE, ODDLY ENOUGH, EXPUNGES THE ENTIRE TRACE PACKAGE.
IT TAKES NO ARGUMENTS.





6/29/72 JONL

1) A POINT TO NOTE WELL: CERTAIN LOSING SITUATIONS WILL FIRST BE 
    TRAPPED OUT BY SOME OF THE NEW ERROR INTERRUPT FUNCTIONS, AND SOME
    USERS HAVE NOT RECOGNIZED THE BREAK-POINT IDENTIFICATIONS AS 
    MEANINGFUL.  AMONG THE MOST COMMON CAUSES OF AMAZEMENT ARE:
	BKPT GC-LOSSAGE		MESSAGE FROM THE GC-LOSSAGE FUNCTION, 
				MEANING THAT YOU HAVE EXAUSTED SOME 
				STORAGE SPACE.
	BKPT FAIL-ACT		ANY OF A NUMBER OF SYSTEMIC PROBLEMS 
				HAS ARISEN. SEE POINT 5 BELOW.
    AFTER ANY SUCH BREAK-POINT, IT IS USUALLY GOOD STRATEGY TO TYPE 
    ARGS<SPACE> TO SEE WHAT THE TROUBLE-MAKER IS.

2) CATCH AND THROW ARE BOTH FSUBRS AND HAVE OPTIONAL SECOND
    ARGS WHICH ARE CONSIDERED TAGS.  (THROW FOO T1) WILL THROW BACK
    TO THE MOST RECENT SETTING OF (CATCH (BAR) T1).  (THROW FOO) WILL
    BE CAUGHT BY THE MOST RECENT CATCH, REGARDLESS OF ANY TAG SETTING,
    AND (CATCH (BAR)) WILL CATCH ANY THROW.  HOWEVER, (CATCH (BAR) T2)
    WILL NEVER CAPTURE A (THROW FOO T1) -  IF THERE IS NO CATCH TO 
    MATCH A GIVEN THROW (EITHER ONE WITH THE SAME TAG NAME, OR ELSE A 
    TAG-LESS CATCH), THEN AN UNSEEN-GO-TAG CORRECTABLE ERROR IS DONE.


3) A REMINDER THAT THE SECOND ARG, IF SUPPLIED, TO THROW, TO CATCH, 
    TO ERRSET, AND TO ERR IS NOT EVAL'D, BUT USED DIRECTLY AS A TAG 
    OR INDICATOR.  [A NON-NILL SECOND ARG TO ERR SAYS EVALUATE THE 
    FIRST ARG ONLY AFTER UNDOING THE ERRSET THAT IS ABOUT TO CATCH 
    THE ERR.  THE ORDINARY CASE IS TO EVALUATE THE FIRST ARG 
    IMMEDIATELY, THEN UNDO THE ERRSET - THUS ERRORS DURING THE 
    EVALUATION OF THE FIRST ARG WILL BE CAUGHT BY THE ERRSET THAT 
    WAS ABOUT TO RECEIVE THE OUTPUT OF ERR.   (ERR FOO) IS 
    EQUIVALENT TO (ERR FOO NIL)].

4) UPON STARTING UP A LISP,  THE ATOM TTY IS SET TO A NUMBER 
   DESCRIBING THE TYPE OF TERMINAL THE JOB IS ATTACHED TO:
	0	PRINTING, LIKE TELETYPE, MEMOREX, DATEL, ETC.
	1	NEW STYLE DATAPOINT
	2	OLD STYLE DATAPOINT
	3	IMLAC
    THIS LIST MAY BE EXPANDED IN THE FUTURE.


5) NVSET AND NVFIX INTERACT VERY SMOOTHLY WITH THE FAKE TV PACKAGE OF 
    JERRY LERMAN.   A FORTH COMING DOCUMENT BY JERRY WILL DESCRIBE ITS
    USAGE COMPLETELY, INCLUDING SSTATUS CALLS IN LISP TO SWITCH FROM
    FAKE TO REAL TV.

6) A FEW MORE ERROR CONDITIONS HAVE BEEN ADDED TO THE CORRECTABLE 
    CATEGORY, UNDER THE FAIL-ACT BRAND.  [THE FAIL-ACT FUNCTION IS 
    HANDED A LIST THAT IS GENERALLY VERY DESCRIPTIVE OF SOME REQUESTED
    ACTION THAT CANNOT BE DONE].  A COMPLETE LIST FOLLOWS:
	A) AN ARRAY ACCESS ERROR HAS BEEN DETECTED, INDEX IS TOO 
	   LARGE OR TOO SMALL
	B) A REQUEST IS MADE OF NVFIX FOR A POINT OUTSIDE THE SCREEN 
	   AREA [OR IN ADDITION, FOR THE FAKETV, A POINT NOT STORED].
	C) *REARRAY IS DONE ON SOMETHING THAT ISN'T CURRENTLY AN ARRAY
	D) (UREAD FN1 FN2), (UKILL FN1 FN2),  OR (SSTATUS FTV FN1 FN2)
	   IS DONE ON A NON-EXISTENT FILE.
	E) REMPROP IS TRYING TO REMOVE A VALUE CELL FROM AN IMPORTANT 
	   SYSTEM ATOM.
	F) GO OR RETURN IS CALLED, BUT THERE IS NO PROG IN USE.
	G) ARG OR SETARG IS CALLED, BUT THERE IS NO LEXPR IN USE.
    IN EACH CASE ABOVE, THE FAIL-ACT INTERRUPT FUNCTION MAY RETURN A
    LIST CONTAINING ONE FORM TO BE EVAL'D IN PLACE OF THE LOSING 
    ACTION; THE INITIAL SETTING OF FAIL-ACT IS MERELY A BREAK LOOP, 
    SO THAT ONE CAN RETURN FROM IT BY TYPING (RETURN RETVAL).
    THE FAIL-ACT ERRORS LISTED BELOW HAPPEN ONLY TO INFORM THE USER 
    THAT SOME REQUESTED ACTION DIDN'T ACTUALLY HAPPEN, OR TO TELL HIM
    THAT SOME SYSTEM PARAMETER HAD TO BE RESTORED TO AN INITIAL VALUE.
    AGAIN, IF THE INTERRUPT  FUNCTION RETURNS NIL, AN ORDINARY LISP 
    ERROR WILL BE INITIATED, BUT IF SOME NON-NULL LIST IS RETURNED, 
    THEN THE SYSTEM WILL TRY TO RECUPERATE AS BEST AS IS POSSIBLE.
	H) BAD GCMIN LIST - WAS RESTORED TO INITIAL VALUE
	I) BAD IBASE - WAS RESTORED TO EIGHT.
	J) ATTEMPT TO SETQ NIL - VALUE OF NIL REMAINS UNCHANGED
	K) ATTEMPT TO WRITE ON A UWRITE OUTPUT CHANNEL, BUT NO UWRITE
	   HAS BEEN DONE.  ↑R HAS BEEN SHUT OFF, AND WILL BE TURNED 
	   ON AGAIN UPON EXIT IF THE INTERRUPT FUNCTION DOES A UWRITE.
	L) ATTEMPT TO READ FROM A UREAD FILE, BUT NONE HAS BEEN 
	   SELECTED [ARGS IS BOUND TO (UREAD)].  ↑Q IS RESET TO NIL, 
	   AND WILL BE TURNED ON AGAIN UPON EXIT IF THE INTERRUPT 
	   FUNCTION DOES A UREAD.
    THERE MAY BE, IN THE FUTURE, ADDITIONS TO THIS LIST.

7) CERTAIN SUB-PACKAGES OF THE LISP SYSTEM ARE NOW GROUPED TOGETHER ON
    A SINGLE PAGE [EVEN THOUGH THIS MEANS WASTING A FEW CELLS THAT ARE
    UNUSED] SO THAT THE USER WHO DOESN'T USE THAT SUB-PACKAGE WONT 
    NEED ANY PART OF IT IN CORE.  THESE ARE ARE ALL PURE PAGES, AND
    SOME OF THE IDENTIFIABLE SUB-PACKAGES ARE:
	ERROR PROCESSING
	UNIQUE I/O DEVICE CODE [LIKE VIDISSECTOR, 340 SLAVE, ETC.]
	EVAL-APPLY AND CERTAIN OPEN-CODED FUNCTIONS
		[COMPILED CODE WONT BE USING THIS PAGE MUCH]
	INFINITE-PRECISION ARITHMETIC ROUTINES
	READ, AND ASSOCIATED FUNCTIONS [LIKE TYI, READLIST]
	GARBAGE COLLECTOR, AND LISP INITIALIZATION
	STATUS ,SSTATUS AND EDIT
	ARRAY-DEPENDENT FUNCTIONS [LIKE ARRAY, MAKREADTABLE, ETC.]
		GETSP, SUBLIS, AND FUNARG STUFF
	CERTAIN CONSTANT INITIAL LIST STRUCTURE [3 PAGES]
	BINARY PROGRAM SPACE [NOT INITIALLY PURE]
    IN ADDITION, THERE IS A PAGE OF WELL-KNOWN AND OFTEN-USED SUBRS; 
    AND A PAGE CONTAINING THE PRINT-RELATED OUTPUT FUNCTIONS ALONG 
    WITH SOME LESSER-KNOWN SUBRS; AND A PAGE CONTAINING THE TOP-LEVEL 
    CODE, THE INTERRUPT HANDLER AND UUO HANDLER CODE, AND SOME COMMON
    SYSTEM SUBROUTINES.




06/09/72  JONL

1)  THERE ARE SOME NEW FUNCTIONS DESCRIBED IN ITEMS 3-7 BELOW, AND A 
FEW MINOR INCOMPATIBILITIES DESCRIBED IN 8-14.  ITEM 2 IS REPRODUCED 
FROM THE LAST NOTE TO EMPHASIZE THE CONTINUING DIFFICULTY WITH THE 
COMPILATION OF ERRSET'S:
 BECAUSE OF THE NATURE OF ITEM 2 BELOW, SOME FILES COMPILED PRIOR
TO TODAY MAY NOT WORK IN THE CURRENT LISP [LISP 229AS].  READ THIS
NOTE CAREFULLY.

2) THERE IS A NEW PAIR OF BREAK-AWAY FUNCTIONS: CATCH, A FSUBR WHICH 
MERELY EVALS THE FIRST ITEM IN ITS ARGLIST, AND THROW, A SUBR OF ONE 
ARGUMENT WHICH BREAKS AWAY BACK TO THE MOST RECENT CATCH, CAUSING 
CATCH TO RETURN AS ITS VALUE THE ARGUMENT TO THROW.  IF NO THROWS TAKE
PLACE, THE CATCH MERELY RETURNS THE EVALUATION WHICH IT COMMENCED.
THIS MECHANISM IS INDEPENDENT OF ERRSET, AND SHOULD ALLEVIATE PROBLEMS
FOR THOSE WHO HAVE BEEN USING ERRSET AND ERR TO DO THE JOB THAT CATCH
AND THROW NOW DO.  HOWEVER, MORE STUFF MUST BE SAVED UP WHEN A CATCH 
OR ERRSET IS EVAL'D AND THUS CODE COMPILED BY COMPILERS PRIOR TO 
NUMBER 246 WILL NOT HAVE COMPILED ERRSET EVALUATIONS CORRECTLY.


3) THE FAKE TV [PSEUDO-VIDISSECTOR] WILL USE AS MANY BLOCKS OF CORE 
TO HOLD THE SIMULATED DATA AS THE USER REQUESTS; DEFAULT IS 4. 
THE REQUEST IS MADE AS (SSTATUS FTVSIZE N) FOR SUITABLE N, AND 
(STATUS FTVSIZE) WILL READ OUT THIS PARAMETER.  DEPENDING ON ONE'S 
SCAN PATTERN, HE MAY CAUSE FREQUENT, TIME-CONSUMING DISK REFERENCES;
THE HOPE IS TO MINIMIZE THIS BY ALLOWING MANY BLOCKS OF DATA TO
BE IN CORE AT ONCE.

4) ALL USER INTERRUPT SERVICE FUNCTIONS HAVE BEEN ASSIGNED TO THE 
VALUE OF A SUTIABLE-SOUNDING ATOM.  ONE CAN STILL ACCESS THEM USING 
THE STATUS CALLS, BUT THE USE OF LISP VARIABLES ALLOWS MNEMONIC 
REFERENCE AS WELL AS LAMBDA-BINDING POSSIBILITIES.

      NAME	INTERRUPT #	DESCRIPTION
    ↑H			1	CONTROL-H TYPED ON CONSOLE
    ALARMCLOCK		3	ALARMCLOCK EXPIRED
    ERRSET		4	ERROR BEING CAUGHT BY ERRSET
    UNDF-FNCTN		5	UNDEFINED FUNCTION OBJECT ENCOUNTERED
    UNBND-VRBL		6	UNBOUND VARIABLE
    WRNG-TYPE-ARG	7	WRONG OR UNSUITABLE ARG FOR FUNCTION
    UNSEEN-GO-TAG	8.	GO TO A TAG NOT WITHIN PROG
    WRNG-NO-ARGS	9.	WRONG NUMBER OF ARGS TO FUNCTION
    GC-LOSSAGE		10.	NOT ENOUGHT SPACE RECLAIMED
    FAIL-ACT		11.	SOME REQUESTED ACTION FAILED
    *RSET-TRAP		19.	AN ERROR CAUSING RETURN TO TOPLEVEL
    GC-DAEMON		20.	A MONITOR ON THE GARBAGE COLLECTOR

INTERUPTS 5 THROUGH 11. COME PRESET IN THE LISP TO A SYSTEM SUBR 
WHICH MERELY BINDS THE ATOM ARGS AS NOTED PREVIOUSLY, AND ENTERS A
BREAK LOOP [WITH IDENTIFICATION THE SAME AS THE NAME OF THE INTERRUPT]
ONE CAN THUS INSPECT THE CAUSE OF HIS LOSSAGE, TAKE CORRECTIVE ACTION,
AND RETURN A LIST CONTAINING SOME NEW FORM [OR PERHAPS THE SAME OLD 
ONE, IF IT HAS BEEN CORRECTED] TO TRY INSTEAD.
    FAIL-ACT IS A NEW CORRECTABLE ERROR USER INTERRUPT, WHICH IS 
INVOKED  ONLY A FEW PLACES CURRENTLY.  USUALLY THE SERVICE FUNCTION 
WILL BE HANDED SOME DESCRIPTIVE LIST AS ARGUMENT.  TO PRECEED FROM A 
FAIL-ACT ERROR, ONE RETURNS A LIST OF SOME FORM TO BE EVAL'ED IN PLACE
OF THE ONE THAT FAILED IN ACTION.
    THE GC-DAEMON FUNCTION, AS NOTED PREVIOUSLY, IS HANDED A LIST 
SHOWING THE BEFORE-AND-AFTER AMOUNTS THAT ARE FREE IN THE VARIOUS 
STORAGE SPACES.  IN THIS WAY, ONE CAN ASCERTAIN WHICH SPACES NEED MORE
ALLOCATION.  E.G., TRY (SETQ GC-DAEMON '(LAMBDA (GCL) (PRINT GCL)))
    ALSO, THE GCMIN FEATURE, THAT ALLOWS THE USER TO SPECIFY THE LOWER
LIMIT OF FREE STORAGE FOR EACH SPACE, IS NOW THE VALUE OF THE ATOM 
GCMIN.  THUS ONE WOULD SAY  (SETQ GCMIN '(1000 200 10))  TO SAY TO THE
GARBAGE COLLECTOR THAT IT SHOULD CONSIDER IT AN ERROR IF THE AMOUNT OF
SPACE FREE FOR STORING LIST STRUCTURE FALLS BELOW 1000, OR FOR FIXNUMS
FALLS BELOW 200, OR FLONUMS BELOW 10.

5) THE READER'S SYNTAX TABLE IS NOW AN ARRAY, WHOSE SPECIAL ARRAY CELL
IS POINTED TO BY THE VALUE OF THE ATOM READTABLE.  THUS ONE CAN 
QUICKLY SWITCH BACK AND FORTH BETWEEN SEVERAL SYNTAX OPTIONS BY 
MEANS OF LAMBDA BINDNG AND SETQ.  AS WITH THE OBARRAY FEATURE, THERE 
IS A NEW FUNCTION TO CREATE A COPY OF THE CURRENT READ SYNTAX TABLE 
AS AN ORDINARY LISP ARRAY.  E.G.,
	(MAKREADTABLE 'LISP1/.5)	;(MAKREADTABLE NIL) WOULD 
					;GENSYM UP AN ARRAY
	((LAMBDA (READTABLE)		;WE WANT THE LISP1/.5 
		 (SSTATUS MACRO /; NIL) ;TABLE TO HAVE NONE OF THE
		 (SSTATUS MACRO /' NIL));MACLISP SYNTAX OPTIONS
	   (GET 'LISP1/.5 'ARRAY))

6) ERRPRINT, A NEW SUBR OF ONE ARGUMENT, WAS IMPLEMENTED TO AID
IN DEBUGGING.  WHEN AN ERROR OCCURS, THE LISP SYSTEM PUSHES SOME ERROR
INFORMATION ON THE PDL AND RUNS THE CORRESPONDING INTERRUPT FUNCTION
IF THERE IS ONE, AND MAY ALSO RUN THE *RSET-TRAP FUNCTION JUST BEFORE
RESTORING BACK TO TOP LEVEL.  THESE SERVICE FUNCTIONS ARE OFTEN BREAK
LOOPS, AND ONE MISSES THE ERROR MESSAGES  THAT ARE ULTIMATELY
PRINTED OUT.  THE ARGUMENT TO ERRPRINT IS EITHER NIL OR A PDL POINTER,
JUST LIKE THE ARGUMENT TO FRAME [SEE PREVIOUS LISP NOTE]. 
(ERRPRINT NIL) PRINTS OUT THE MOST RECENTLY STACKED-UP ERROR MESSAGE,
AND (ERRPRINT FOO) BEGINS SEARCHING THE PUSH-DOWN STACK FOR AN ERROR
MESSAGE PRIOR TO THE POINT NOTED BY THE PDL POINTER FOO.
    AS SOME USERS HAVE ALREADY NOTICED, IF AN ERROR IS CAUGHT BY AN 
ERRSET, AND THE USER INTERUPT NUMBER 4 IS NOT ENABLED, THERE IS NO 
ACTION BY THE CORRESPONDING ERROR SERVICE FUNCTION, THE IDEA BEING 
THE CATCH BY THE ERRSET WAS SUFFICIENT ACTION.  SINCE THE 
SYSTEM-SUPPLIED SERVICE FUNCTIONS ARE PRIMARILY A CALL TO THE FSUBR 
BREAK, AND SINCE THE EVALUATIONS BEGUN AT THE TELETYPE ARE CUSHIONED 
BY A SURROUNDING ERRSET, THEN THE ERROR SYSTEM DOES NOT AT FIRST 
GLANCE APPEAR TO BE RECURSIVE.  IT IS, HOWEVER, AS THE USER MAY VERIFY
BY WRITING HIS OWN INTERRUPT SERVICE FUNCTIONS, OR BY SETQ'ING ERRSET
TO AN APPROPRIATE FUNCTION.


7A)  A NEW FUNCTION BLTARRAY, A SUBR TO TWO ARGUMENTS, ASSUMES THAT 
BOTH ARE ARRAYS, AND ZAPS AS MUCH AS POSSIBLE OF THE FIRST INTO THE 
SECOND USING THE BLT INSTRUCTION OF THE PDP10.  BLTARRAY DOES NOT 
*REARRAY EITHER ARRAY; THAT IS TO SAY THAT NEITHER ARRAY IS MOVED 
AROUND, NOR IS EITHER ARRAY EXTENDED IN SIZE.
7B)  A NEW FUNCTION ARRAYDIMS, A SUBR OF ONE ARGUMENT, ASSUMES THAT 
ITS ARGUMENT IS AN ARRAY, AND RETURNS A LIST OF THE TYPE AND SIZES OF 
EACH DIMENSION OF THE ARRAY.  THUS IF AN ARRAY BAZ WERE CREATED BY 
(ARRAY BAZ T 2 30),  (ARRAYDIMS 'BAZ) WOULD RETURN (T 2 30).

8)  ** DELETED **

9) THERE ARE TWO NEW FUNCTIONS LOADARRAYS AND DUMPARRAYS;  THE PLANNED
   USAGE IS FOR QUICKLY SWAPPING DATA ARRAYS IN AND OUT OF AUXILLIARY 
   STORAGE. [A DATA ARRAY, AS OPPOSED TO AN S-EXPRESSION ARRAY, IS 
   ONE THAT WAS MADE WITH THE GC BIT OFF - AS IN (ARRAY FOO NIL 40). 
   DISGORGE RETURNS SUCH AN ARRAY, AND MUCH USAGE OF LOADARRAYS AND 
   DUMPARRAYS CENTERS AREOUND THE DISPLAY SLAVE.
	DUMPARRAYS TAKES TWO ARGUMENTS, THE FIRST OF WHICH IS A LIST 
   OF THE NAMES OF THE ARRAYS TO BE DUMPED ONTO AN OUTPUT FILE, AND 
   THE SECOND OF WHICH IS A FILE SPECIFICATION [WITH DEFAULTING LIKE 
   UREAD].  LOADARRAYS HAS ONE ARGUMENT, A FILE SPECIFICATION FOR 
   SOME FILE CREATED BY DUMPARRAYS, WHICH IT PROCEEDS TO SNARF DOWN,
   LOADING AS MANY ARRAYS [WITH GENSYM'ED NAMES] AS ARE INDICATED IN
   THE INPUT FILE, AND RETURNING A LIST OF 3-LISTS FOR EACH 
   NEWLY LOADED-IN ARRAY:
	A) GENSYM NAME OF NEWLY-CREATED ARRAY
	B) ORIGINAL PNAME OF ARRAY WHEN DUMPARRAYED
	C) SIZE OF ARRAY [IN TERMS OF NUMBER OF ENTRIES]
   EXAMPLE USAGE:
     (ARRAY FOO NIL 40)			;FOO CREATED HERE - 
     (NSTORE (A 37) 105105)		;ASSUME BAR ALREADY EXISTS
     (DUMPARRAY '(FOO BAR) '(FOOD DATA DSK VIS))
     (SETQ COPIES (LOADARRAYS '()))	;NOTE DEFAULTING AS IN UREAD
					;CAUSES SAME FILE TO BE OPENED
     (MAPC '(LAMBDA (X) (DISGOBBLE (CAR X))) COPIES)
					;LOOK AT COPIES FROM DSK


10.) THE ARGUMENT GIVEN TO THE INTERRUPT FUNCTIONS FOR UNDF-FNCTN, 
UNBND-VRBL, WRNG-TYPE-ARG, AND UNSEEN-GO-TAG  IS NOW A LIST OF THE 
LOSING ITEM, RATHER THAN SIMPLY THE LOSING ITEM. THUS IF FOO WERE THE 
UNBOUND VARIABLE, ARGS WOULD BE BOUND TO (FOO)

11.) ARRAY ACCESS ERRORS NOW CAUSE A CORRECTABLE ERROR OF TYPE 
"FAIL-ACT", [USER INTERUPT NUMBER 7],  WHICH MAY BE PROCEEDED WITH ANY
FORM TO BE EVALUATED IN PLACE OF THE FAULTY REFERENCE.  THE INTERRUPT
FUNCTION, INTITIALLY SET TO A BREAK LOOP WITH ARGUMENT "ARGS", IS 
HANDED A 2-LIST WHOSE FIRST ELEMENT IS THE ATOM "ARRAYINDEX" AND THE 
SECOND IS A LIST OF THE ARRAY NAME AND THE VALUES OF THE INDICES 
THAT CAUSED THE ERROR,  E.G. (ARRAYINDEX (BAR 3 5)). THE
USER COULD RESTART THE EVALUATION BY RETURNING SAY ((BAR 2 4)), [OR
FOR EXAMPLE, ((RANDOMNESS PHOOEY)) IF SOME OTHER VALUE IS DESIRED].
IF THE ARRAY IS NOT ON THE OBLIST, [SUCH WOULD BE THE CASE WITH A 
NON-INTERN'ED GENSYM'ED ARRAY] THE ARGUMENT TO THE  INTERRUPT WILL BE 
(ARRAYINDEX (? 3 5)), THE ? INDICATING THAT  A PNAME FOR THE ARRAY 
COULD NOT BE READILY OBTAINED.
 
12.)  ** DELETED **

13.)  THE COMPLR WILL NOW OUTPUT ARGS INFORMATION [IN THE FORM 
OF PSEUDO-OPS TO LAP] ABOUT EXPRS WHICH IT COMPILES, AND LAP WILL TRY
TO USE THIS INFORMATION TO PLACE ARGS PROPERTIES OF THE FUNCTIONS 
ASSEMBLED.  THERE IS A COMPILER SWITCH TO CONTROL THE OUTPUTTING OF 
THIS INFORMATION - NORMALLY THE SWITCH IS ON - BUT A DECLARATION OF 
(NOARGS T) WILL TURN IT OFF SO THAT THE COMPLR WILL NOT OUTPUT THIS
STUFF;  OF COURSE (NOARGS NIL) TURNS IT BACK ON AGAIN.



14.) THE DELAYED-READ-MACRO FEATURE HAS BEEN FLUSHED. ALSO, THE CLI 
INTERRUPT HAS BEEN FLUSHED.

 




05/03/72  JONL

1) BECAUSE OF THE NATURE OF ITEM 2 BELOW, SOME FILES COMPILED PRIOR
TO TODAY MAY NOT WORK IN THE CURRENT LISP [LISP 229AF].  READ THIS
NOTE CAREFULLY.

2) THERE IS A NEW PAIR OF BREAK-AWAY FUNCTIONS: CATCH, A FSUBR WHICH 
MERELY EVALS THE FIRST ITEM IN ITS ARGLIST, AND THROW, A SUBR OF ONE 
ARGUMENT WHICH BREAKS AWAY BACK TO THE MOST RECENT CATCH, CAUSING 
CATCH TO RETURN AS ITS VALUE THE ARGUMENT TO THROW.  IF NO THROWS TAKE
PLACE, THE CATCH MERELY RETURNS THE EVALUATION WHICH IT COMMENCED.
THIS MECHANISM IS INDEPENDENT OF ERRSET, AND SHOULD ALLEVIATE PROBLEMS
FOR THOSE WHO HAVE BEEN USING ERRSET AND ERR TO DO THE JOB THAT CATCH
AND THROW NOW DO.  HOWEVER, MORE STUFF MUST BE SAVED UP WHEN A CATCH 
OR ERRSET IS EVAL'D AND THUS CODE COMPILED BY COMPILERS PRIOR TO 
NUMBER 240 WILL NOT HAVE COMPILED ERRSET EVALUATIONS CORRECTLY.

3) MOST SYSTEM SUBRS AND LSUBRS HAVE AN ARGS PROPERTY SUPPLIED BY THE 
SYSTEM.  IN *RSET MODE, THE INTERPRETOR WILL CHECK, INASMUCH AS IS
POSSIBLE, TO SEE THAT ANY FUNCTION CALL IS MADE WITH THE CORRECT 
NUMBER OF ARGUMENTS, AND IF NOT WILL CREATE A CORRECTABLE ERROR ON 
USER INTERRUPT 9. [CURRENTLY THE SYSTEM SUPPLIES A BREAK LOOP FOR 
THIS INTERRUPT.]  FOR SUBRS THE ARGS PROPERTY IS (NIL . N) WHERE N IS 
THE REQUIRED NUMBER OF ARGUMENTS, AND FOR LSUBRS THE PROPERTY IS 
(N . M) WHERE AT LEAST N ARGUMENTS ARE REQUIRED, AND AT MOST M ARE 
ALLOWED.

4) FOR EFFICIENCY REASONS, THE INTERPRETOR WILL LOOK FOR AN ARGS 
PROPERTY ONLY ON THE PORTION OF THE PROPERTY LIST FOLLOWING THE 
FUNCTION PROPTERTY.  THUS THE FUNCTION ARGS, A SUBR OF TWO ARGUMENTS, 
HAS BEEN IMPLEMENTED TO FACILITATE PLACING THE ARGS PROPERTY AT THE 
END OF THE PROPERTY LIST:  THE FIRST ARGUMENT IS THE NAME OF THE 
FUNCTION IN QUESTION, AND THE SECOND ARGUMENT IS A DOTTED PAIR AS 
DESCRIBED IN ITEM 3 ABOVE.  THIS CHECKING FEATURE HAS BEEN OBSERVED 
TO REQUIRE AN ADDITIONAL AMOUNT OF RUNNING TIME OF BETWEEN 2% AND 10.%
DEPE
j ON THE PROGRAM.  FOR THIS REASON, IT MAY BE DISENABLED 
AS DESCRIBED IN ITEM 5 BELOW.

5) *RSET HAS TAKEN OVER THE FUNCTION OF NOCHK - THAT IS, (*RSET T)
WILL [AMONGST OTHER EFFECTS] CAUSE ARRAY REFERENCES TO BE CHECKED 
FOR INDEX WITHIN PROPER RANGE, AND (*RSET NIL) WILL [AMONGST OTHER 
THINGS] INHIBIT THIS TIME CONSUMING CHECKING.  ALSO, *RSET = NIL
WILL DISENALBE THE ARGUMENT NUMBER CHECKING, AND *RSET = T  WILL 
ENABLE IT.

6) THERE IS A NEW FUNCTION BAKLIST, A SUBR OF NO ARGUMENTS, WHICH 
OBTAINS A LIST VERY SIMILAR TO THE STUFF PRINTED OUT BY BAKTRACE. 
AS USUAL, UNLESS *RSET = T, THE AMOUNT OF INFORMATION CONTAINED 
THEREIN MAY BE MINIMAL.

7) THERE IS A NEW DEBUGGING AID, A FUNCTION CALLED EVALFRAME, WHICH 
IS A SUBR OF ONE ARGUMENT.  WHEN IN *RSET = T MODE, THE EVALUATOR WILL
PUSH ONTO THE PDL THE FORM WHICH IT IS TRYING TO EVAL [ALONG WITH A 
SPECIAL MARKER INDICATING JUST THAT].   (EVALFRAME NIL)  WILL RETRIEVE
A 3-LIST (P FORM ALIST), WHERE P, A LISP NUMBER, IS THE PDL POINTER 
OF THE MOST RECENT MARKING BY EVAL, FORM IS THE ARGUMENT TO EVAL AT 
THAT POINT, AND ALIST, A LISP NUMBER ALSO, IS A SPECIAL PDL POINTER 
SUCH AS CAN BE USED AS A SECOND ARGUMENT TO EVAL IN PLACE OF AN 
A-LIST.  (EVALFRAME P) WHERE P IS A PDL POINTER, WILL GET THE FRAME 
[AS A 3-LIST] OF THE CALL TO EVAL JUST PRIOR THE THE ONE MARKED ON 
THE PDL AT P.  [SEE NOTE OF 8/9/72 SECTION 2 FOR POSSIBLE VARIATIONS 
ON THE RANGE OF P].  THE MAIN  PURPOSE OF THIS FUNCTION IS TO AID 
IN FINDNG THE CONTEXT IN WHICH AN ERROR HAS OCCURRED;  FOR EXAMPLE, 
SUPPOSE A CORRECTABLE ERROR OCCURS, THE CORRESPONDING BREAK INTERUPT
IS ENTERED, AND BY APPROPRIATE  CALLS TO FRAME THE USER HAS FOUND A 
PLACE REVEALING THE ERROR; SUPPOSE FURTHER THAT HE WANTS TO LOOK AT 
SOME VARIABLES AND SEE WHAT VALUE THEY HAD JUST BEFORE EVAL BEGAN 
WORK ON THE FORM.  THEN THE ALIST OF THAT FRAME IS RELEVANT IN THAT 
HE MIGHT TRY   (EVAL '(BREAK PEEKBACK T) ALIST)

8) ** DELETED ** 

9) GENSYM IS NOW AN LSUBR, AND IF GIVEN AN ARGUMENT WILL RESET THE 
GENSYM COUNTER AS DESCRIBED BELOW:
   ARGUMENT IS OF TYPE PNAME  - RESETS THE LETTER PREFIX 
   ARGUMENT IS OF TYPE FIXNUM - RESETS THE 4 DIGIT NUMBER [BY 
				PRINTING OUT THE ARGUMENT IN BASE 10.
				AND USING THE LAST FOUR DIGITS.]


10) (DISFRAME N) CAUSES THE DISPLAY SLAVE TO GIVE N ZAPS OF THE
DISPLAY TO AN ATTACHED MOTION PICTURE CAMERA.

11) EXPT WILL NOW DO VERY WELL WHEN THE MAGNITUDE OF ITS FIRST 
ARGUMENT IS EITHER 0 OR 1.  IN SHORT, IT VERY QUICKLY UTILIZES THE 
MATHMEMATICAL FACTS THAT  1↑X=1,  -1↑X=(COND((ODDP X)-1)(1)), 
AND 0↑X=0; FOR CONVENIENCE, IT GIVES 0↑0=1.   EXPT DOES NOT ALLOW 
EXPONENTS OTHER THAN NON-NEGATIVE INTEGERS, BUT HAS LONG CAPITALIZED
FOR SPEED UPON THE FACT THAT X↑0=1


4/19/72  - JONL -


LISP WILL NOW CHECK THE NUMBER OR ARGUMENTS GIVEN TO A SYSTEM SUBR,
AND GENERATE A [CORRECTABLE] ERROR IF THE WRONG NUMBER ARE GIVEN.
THERE IS A NEW FUNCTION, "ARGS", OF TWO ARGUMENTS IMPLEMENTED
TO OBTAIN THE NUMBER OF ARGS FOR A GIVEN SUBR, AND TO SET THIS 
PARAMETER CURRENTLY, THIS FEATURE IS IMPLEMENTED USING AN "ARGS" 
PROPERTY ON THESE ATOMS.

THE CORRECTABLE ERRORS ARE UTILIZED BY MEANS OF THE USER INTERRUPT
FEATURE - IF THE INTERUPT NUMBER CORRESPONDING TO THE ERROR
HAS AN ASSOCIATED FUNCTION, AND IF THE ERROR IS NOT CAUGHT UNDER 
ERRSET,  THEN THAT FUNCTION WILL BE APPLIED TO AN APPROPRIATE 
ARGUMENT, AND THE RESULT, IF NON-NIL, WILL BE TAKEN TO BE A LIST 
OF A CORRECTED FORM.  THE BASIC GOAL OF AN ERROR RECOVERY  INTERRUPT
IS TO DETECT A FAULTY FORM NOT OTHERWISE CAUGHT [AS BE ERRSET], 
AND TO ALLOW THE USER TO SUBSTITUTE A CORRECTED FORM FOR THE FAULTY
ONE;  IF THE SERVICE IS ASSUMED THAT NO CORRECTION IS DESIRABLE, 
AND AN ORDINARY LISP ERROR IS CREATED, WITH CONSEQUENT RETURN TO 
TOP LEVEL.  INITIALLY, THESE INTERRUPTS COME SET TO A SIMPLE 
INTERNAL  FUNCTION, WITH ARGUMENT "ARGS", THAT SIMPLY ENTERS A 
BREAK LOOP. [A BREAK LOOP HAS AN EXPLICIT ERRSET AROUND IT, SO THAT 
ERRORS AT THIS LEVEL WILL BE RETURNED TO THE LOOP, RATHER THAN ENTER 
THE RECOVERY SYSTEM RECURSIVELY.  HOWEVER THE USER MAY RESET THE 
INTERRUPT FUNCTION TO ONE THAT DOES NOT DO AN ERRSET, AND THUS 
EXPECT RECURSIVE HANDLING OF ERRORS.]


 INTERRUPT # 	MEANING

	5	UNDEFINDED FUNCTION - USER CAN GIVE ANOTHER FUNCTION
		TO BE USED IN PLACE OF LOSER, OR DEFUN THE LOSER AND
		GIVE IT BACK TO BE TRIED AGAIN.
	6	UNBOUND VARIABLE - USER CAN GIVE BACK ANY FORM TO BE
		EVAL'D IN PLACE OF THE VALUELESS VARIABLE.
	7	WRONG TYPE OF ARGUMENT - AS FOR UNBOUND VARIABLE, 
		CAN GIVE OUT ANY FORM TO BE EVAL'D AND TAKE THE PLACE
		OF THE LOSING ARGUMENT
	8.	UNSEEN GO TAG - CAN GIVE AN ATOM TO TRY AS THE 
		RIGHT GO TAG.
	9.	WRONG NUMBER OF ARGUMENTS TO SOME FUNCTION - THE 
		EVALUATION OF SOME FORM WILL HAVE TO BE RESTARTED: 
		SEE EXAMPLE IMMEDIATELY BELOW.
	10.	GC LOSSAGE [FAILED TO COLLECT ENOUGH SPACE] - AS 
		DESCRIBED IN PRIOR NOTES, THIS FUNCTION WILL GET AS 
		ARGUMENT EITHER "LIST" "FIXNUM" OR "FLONUM" DEPENDING
		ON WHICH SPACE OVERFLOWED.  IF THE RETURNED VALUE IS
		NON-NIL, ANOTHER GC WILL BE INITIATED AND HOPEFULLY 
		SOME SPACE WILL HAVE APPEARED.

	WHILE IN A BREAK LOOP OF ONE THESE INTERRUPT FUNCTIONS, 
THE USER COULD OF COURSE FIND THE CONTEXT IN WHICH THE OFFENDING 
FORM OCCURS, AND EDIT IT TO SOME CORRECT STATE.  HE IS STILL OBLIGED,
HOWEVER, TO GIVE OUT AS VALUE SOME S-EXPRESSION THAT WILL DO IN 
PLACE OF THE LOSER JUST CAUGHT.

FOR EXAMPLE, IF A USER TRIES TO EVAL (CONS X), THE FUNCTION 
FOR WRONG NUMBER OF ARGUMENTS [INTERRUPT FUNCTION NUMBER 9.],
WILL BE HANDED A TWO-LIST INDICATING THE FUNCTION ABOUT TO BE 
APPLIED AND THE  ARGUMENTS ACTUALLY PASSED ALONG, AND  A NUMBER 
INDICATING THE CORRECT NUMBER OF ARGUMENTS FOR THE FUNCTION.  
[IF CONS WERE AN EXPR, THE SECOND ARGUMENT WOULD BE THE LAMBDA LIST.]
IN THIS EXAMPLE,  ARG = ((CONS (A B C)) 2), WHICH SHOWS THAT CONS
WAS BEING CALLED AND THE VALUE [REPEAT! VALUE] OF THE ARGUMENT 
TO CONS WAS (A B C); THE USER, AFTER INSPECTING ARGS, MIGHT TYPE
	(RETURN '( (CONS '5 '(A B C)) ))
REMEMBERING THAT BREAK, UPON READING A RETURN, WILL ITSELF  RETURN 
THAT VALUE, WHICH IS EITHER NIL OR A LIST OF THE CORRECTED FORM; 
IN THIS  CASE, THE EVALUATION OF (CONS . . .) WILL BE RESTARTED AND 
REPLACED BY (CONS '5 '(A B C)).  ALSO, ONE MIGHT WANT TO HAVE
*RSET = T  WHILE DEBUGGING, SO THAT HE MAY GET MEANINGFUL OUTPUT 
FROM BACKTRACE.


A SAMPLE INTERACTION FOLLOWS, WITH LISP'S OUTPUT PRECEEDED BY *

  (FOO 'X)		;HOPELESS USER WILL TRY ANYTHING
* BKPT UNDF-FNCTN	;LISP GENERATES TIMELY MESSAGE
  ARGS			;USER WOULD LIKE TO KNOW WHAT FUNCTION IS 
* FOO			;CAUSING TROUBLE
  (DEFUN FOO (A B) (PLUS A B))
  (RETURN '( FOO ))	;AFTER CORRECTING, HE TRIES FOO AGAIN
* BKPT WRNG-#-ARGS	;STILL NOT WINNING
  ARGS			;OUR HERO IS STILL CURIOUS
* ((FOO X) (A B))	;SO HE WILL LOOK UP THE MEANING OF THIS IN 
			;.INFO.;LISP ARCHIV, PAGE HEADED 3/17/72
			;IF FOO WERE A SYSTEM SUBR OF TWO ARGUMENTS,
			;THIS VALUE WOULD BE ((FOO X) 2)
  (RETURN '( (FOO 'X 3) ))	;HE THINKS HE SIMPLY FORGOT THE 3
* BKPT WRNG-TYPE-ARG
  ARGS
* X
  (RETURN '( 2 ))	;THIS IS THE LAST KLUDGY ATTEMPT TO WIN
* 5			;AHA, A WELL-KNOWN RESULT


THE WRONG TYPE ARG ERROR IS INTENDED TO CATCH A WIDE VARIETY OF CASES
WHEREIN A FUNCTION HAS BEEN HANDED AN UNSUITABLE ARGUMENT
ORDINARILY, FOR A WRONG TYPE ARG OR AN UNSEEN GO TAG ERROR,
THE OFFENDING S-EXPRESSION IS HANDED TO THE INTERRUPT FUNCTION
WHICH MAY RECOVER BY SUBSTITUTING SOME OTHER ONE FOR IT
[OR BY CORRECTING, AND REQUESTING TO TRY THE SAME ONE AGAIN].
HOWEVER, FOR AN ARRAY ACCESS ERROR, WHICH OCCURS WHEN THE INDEX TO 
THE ARRAY IS TOO LARGE OR IS NEGATIVE, THE WRONG TYPE ARG ROUTINE 
GETS A LIST AS IN THE FOLLOWING EXAMPLE:
   (ARRAY A T 40)
   (STORE (A 37) 'RANDOMVALUE)
   (SETQ N 40)
   (A N)
*  BKPT WRNG-TYPE-ARG
   ARGS 
*  (ARRAYINDEX (A 40))
   (RETURN '( (A (1- N)) ))
*  RANDOMVALUE





JONL 04/19/72  GRINDEF, AS FOUND ON COM:E GRIND
WILL NO LONGER EXIT BY CALLING ERR, BUT WILL RETURN THE ATOM
WITH THE NULL PNAME [(ASCII 0)].  THIS WILL HAVE THE EFFECT
NOT ONLY OF SUPPRESSING THAT ANNOYING * AFTER A GRINDEF, BUT
ALSO IF GRINDEF IS CALLED FROM INSIDE ANOTHER FUNCTION, THERE
WILL BE NO ERR OUT.  VERY SHORTLY, IRA'S GRINDER WILL
BECOME THE STANDARD, BOTH AS COM:E GRIND, AND AS THE ONE IN
SYS:TS INDEX.  IT HAS MANY NICE FEATURES.


JONL 04/12/72  NEW COMPLR, AND READCH.
COMPLR 234 WILL COMPILE THE MULTIPLE-INDEX DO FORMAT RECENTLY
DESCRIBED.  IT ALSO WILL CONVERT A MAP INTO A DO, WHEN NECESSARY, TO
PREVENT MAKING VARIBALES (IN THE LAMBDA-FORM GIVEN TO THE MAP)
UNNECESSARILY SPECIAL.  READCH NOW RUNS FASTLY, IN LISP 229X; 
IN GENERAL, IT CAN BE EXPECTED TO RUN AS FAST AS TYI.




JONL 04/06/72 HINT:  TO PLOT ON THE PLOTTER ALL THE ARRAYS 
   CURRENTLY ON DISPLAY IN THE DISPLAY SLAVE:

(DEFUN PLOTALL NIL
	(PLOTLIST (MAPCAR '(LAMBDA (N) (GET (DISGORGE N) 'ARRAY)) 
			  (DISLIST))))



4/5/72 - JONL-

THERE ARE THREE NEW FEATURES WITH US NOW:
  1) TYIPEEK, A SUBR OF NO ARGUMENTS, WILL INSPECT THE NEXT CHARACTER
     IN THE INPUT STREAM AND RETURN ITS ASCII VALUE LIKE TYI, EXCEPT
     THAT IT WILL NOT GOBBLE UP THE CHARACTER.  THE NEXT READCH OR 
     READ WILL FIND IT STILL IN THE READ STREAM.  FOR THE TTY, THIS 
     MEANS THAT SOME BUFFERING IS DONE BY THE SYSTEM. FOR OTHER INPUT
     DEVICES, SUCH AS HAVE END-OF-FILE CONDITIONS, WHEN THE EOF IS 
     REACHED, TYIPEEK RETURNS 3 [CORRESPONDING TO CONTROL-C]
     INSTEAD OF SWITCHING TO THE NEXT DEFAULT DEVICE.
  2) USER INTERRUPT NUMBER 20. IS A GARBAGE-COLLECTOR DAEMON, 
     OF SORTS.  JUST AFTER EACH COLLECTION, THIS INTERRUPT FUNCTION
     IS CALLED WITH A LIST OF THREE PAIRS OF NUMBERS
       ((LIST0 . LIST1) (FX0 . FX1) (FL0 . FL1))
     LIST0 IS THE NUMBER OF CELLS FREE IN LIST STORAGE SPACE WHEN 
     THE GC WAS INITIATED, AND LIST1 IS THE NUMBER FREE AFTER THE GC 
     FINISHED; SIMILARLY FOR FIXNUM SPACE AND FLONUM SPACE.  IN
     THE ROSY FUTURE, A USER WILL BE ABLE TO ADD BLOCKS OF STORAGE 
     TO ANY SUCH SPACE [INCLUDING PDLS], AND HE WILL PROBABLY HAVE 
     A HEURISTIC GC-DAEMON FUNCTION TO DECIDE WHEN TO DO SO.
 3) IF YOU DEBUG FROM DDT, YOU WILL BE INTERESTED TO KNOW THAT HH}X
     SIMULATES A CONTROL-H INTERRUPT IN LISP.  P.}X STILL PRINTS OUT
     THE RIGHT-HALF OF THE CURRENTLY OPEN CELL AS LIST STRUCTURE; 
     PL.}X WILL PRINT OUT THE LEFT-HALF.


THERE ARE A FEW CORRECTIONS TO THE DESCRIPTION OF THE DISPLAY SLAVE, 
AND IT MIGHT BE WISE TO TAKE ANOTHER COPY IF YOU ARE INTERESTED.  
IT IS AT THE BOTTOM OF THE PAGE IN THIS FILE HEADED 3/17/72

THE SERVICE FUNCTION FOR INTERRUPT NUMBER 10. [CALLED WHEN SOME
STORAGE AREA IS ABOUT TO RUN OUT OF SPACE] WILL BE GIVEN AS ARGUMENT
ONE OF THE THREE ATOMS LIST, FIXNUM, OR FLONUM DEPENDING ON WHICH 
SPACE IS ABOUT TO LOSE.

THE NEW ARITHMETIC FUNCTIONS ANNOUNCED LAST SUMMER FOR NLISP HAVE 
BEEN IN LISP FOR SOME TIME ALSO.  TO RECAPITULATE, THEY ARE:
	+  -  *  /  1+  1-  	  ;WHICH REQUIRE FIXNUM ARGUMENTS
	+$  -$  *$  /$  1+$  1-$  ;WHICH REQUIRE FLONUMS
	 <  >  =			  ;REQUIRES ARGS OF SAME TYPE
IN GENERAL THESE ARE LSUBRS THAT WORK EXACTLY LIKE PLUS, DIFFERENCE, 
TIMES, QUOTIENT, ADD1, SUB1, LESSP, GREATERP, AND EQUAL [<, >, AND =
ARE SUBRS OF TWO ARGUMENTS]; HOWEVER, THE ARGUMENTS MUST OBEY THE 
NOTED RESTRICTIONS.   THIS IS SO THAT THE COMPLR MAY SOMEDAY OPEN 
CODE THESE ARITHMETIC FUNCTIONS, BUT SOME OF THE USER COMMUNITY HAVE 
FOUND THEIR STYLE AND SPELLING PREFERABLE TO THE EARLIER.  FOR THE 
SUPER-HACKER, THERE IS A SERIES OF FUNCTIONS TO DO ARITHMETIC ON THE
ACTUAL DATUM PASSED AS ARGUMENT RATHER THAN THE LISP INTERPRETATION
OF THAT DATUM [E.G., THE NUMBER 69.0E23 IS REPRESENTED AS AN 18.-BIT
ADDRESS IN THE FLONUM STORAGE AREA, CONTENTS OF WHICH ADDRESS IS THE
PDP10 36.-BIT FLOATING-POINT REPRESENTATION OF 69.0E23].  THEY ARE:
	+#  -#  *#  /#  1+#  1-#  <#  >#
OF COURSE, "EQ" IS THE EQUAL TEST FOR POINTERS.  NOTE ALSO THAT 
/, /$, AND /# MUST BE TYPED IN AS //, //$, AND //#.


THE VARIABLE OBLIST FEATURE IS WORKING WELL, AND IS PARTICULARLY 
USEFUL WHEN ONE WANTS TO READ IN A RATHER SELF-CONTAINED FILE OF 
FUNCTIONS BUT DOESN'T WANT FUNCTION DEFINITIONS ON THAT FILE TO 
CONFLICT WITH ALREADY EXISTING USER-DEFINED FUNCTIONS.  FOR EXAMPLE,

    (COMMENT RUNNER BLOCK)	;SINCE THE TOP LEVEL READER WILL READ
				;THIS, THESE ATOMS WILL BE INTERNED
				;ON THE CURRENT [I.E. THE STANDARD]
				;OBARRAY.
    (MAKOBLIST 'RUNOB)	;HERE WE MAKE UP AN OBARRAY FOR USE  WHILE 
			;LOADING IN THE FILE.  AT THIS POINT, IT IS 
			;JUST A COPY OF THE STANDARD, INCLUDING 
			;"RUNNER" AND "BLOCK", WHICH WILL BE THE  
			;SAME IN BOTH OBARRAYS.

************* REMOB IS NOW A SUBR - 10/15/73 *******************

    ((LAMBDA (OBARRAY)	 	;SO HERE WE BIND OBARRAY TO THE ARRAY
				;PROPERTY OF RUNOB
	(REMOB NVFIX NVSET)	;REMOBS TWO ATOMS [COMMON TO BOTH 
				;OBARRAYS] FROM THE RUNOB OBARRAY,
				;BUT NOT FROM THE STANDARD ONE.
	(LOADINFILE RUNNER > DSK FOO)	
				;SUPPOSE WE HAVE A FILE LOADING FUNCTION
	'LOADED)
     (GET 'RUNOB 'ARRAY))

	;SO NEW WE ARE BACK IN THE GOOD OLD STANDARD OBARRAY, BUT 
	;CAN SWITCH TO THE OTHER ONE TO LOOK AROUND IF NECESSARY.
	;FURTHERMORE, WE CAN CALL THE FUNCTION RUNNER FROM EITHER,
	;BUT THE LOCAL FUNCTION "DRAGGER", DEFINED ON THE FILE
	;RUNNER >, CAN BE ACCESSED BY THE READER ONLY WHEN THE 
	;RUNOB OBARRAY IS IN USE.


IN THE NEXT NOTE ON LISP, I HOPE TO HAVE A REVIEW, IN SOME COHERENT 
FORM, OF ALL THE STATUS OPTIONS, ALL THE USER INTERRUPTS AVAILABLE, 
ALL THE READER'S SYNTAX CATEGORIES, AND SOME USEFUL EXAMPLES WHICH 
PLAY UPON THESE GOODIES.  QUITE POSSIBLY, WE NEED A LIBRARY OF
USEFUL READ-CHARACTER MACROS AND CORRECTABLE-ERROR INTERRUPT SERVICE 
FUNCTIONS.



				
3/17/72  - JONL -

THE MAJOR NEW FEATURE OF LISP 229W IS THE USAGE OF THE DISPLAY SLAVE
THAT IRA, JERRY LERMAN AND I HAVE BEEN WORKING ON.  SINCE THE 
DESCRIPTION OF ITS USAGE IT QUITE LENGTHY, IT IS RESERVED FOR LAST 
IN THIS NOTE.

FLOATING POINT OUTPUT IS NOW MUCH MORE READABLE - LISP HAS IMPROVED 
CONVERSION ROUTINES THAT ACTUALLY ROUND TO 8. SIGNIFICANT DECIMAL 
DIGITS, RATHER THAN TRUNCATING AS MOST OTHER PDP10 SYSTEMS PROGRAMS 
DO [THAT IS WHY .1 PRINTS OUT AT YOU AS 0.09999999].  ALSO, 
CALCULATION OF POWER-OF-TEN MULTIPLIERS IS DONE IN DOUBLE-PRECISION 
FLOATING-POINT TO INSURE THAT THE READ-IN PHASE GETS THE BEST 
27.-BIT APPROXIMATION TO THE MANTISSA OF THE NUMBER, AND THAT THE 
PRINT-OUT PHASE DOES NOT LOSE ANY BITS IN THE NORMALIZATION PHASE:
NORMALIZES TO INTERVAL [1.0  10.0)  ALL FLOATING POINT NUMBERS EXCEPT
THOSE IN THE RANGE (.099999999  99999999.5], AND WHEN NORMALIZED 
PRINTS THE EXPONENT PRECEEDED BY "E".


AN EXPANDED FORM THE MULTIPLE-INDEX DO HAS BEEN ADDED TO THE SYSTEM
	(DO INDEXLIST (ENDTEST RETURNVALUE) DOBODY)
THE ITEMS OF AN INDEXLIST MAY BE OF FORMS:
	  (X XINIT XSTEPPER)	WHERE X IS INITIALIZED TO XINIT
				AND MODIFIED AFTER EACH PASS THROUGH 
				DOBODY BY (SETQ X XSTEPPER)
	  (X XINIT)		X IS INITIALIZED TO XINIT,
				AND MAY BE USED LIKE A PROG VAR
	  (X)			LIKE (X NIL)
AN ALTERNATE FORM FOR (ENDTEST RETURNVALUE) IS (ENDTEST), WHICH IS 
TAKEN TO BE (ENDTEST NIL).  CAREFUL ABOUT PARENTHESES - AN ENDTEST 
OF (NULL X) IN THIS ABBREVIATED FORMAT WOULD LOOK LIKE, FOR EXAMPLE,
	   (DO	  ((X LONGLIST (CDR X)) (N 5 (SUB1 N)) (FLAG))
		  ((NULL L))
		(COND ((EQ (CAR L) 'FOO) (SETQ FLAG T))
		      (((EQ (CAR L) 'BAR) (SETQ FLAG N))))
		(INFORM (CAR L) FLAG)
		(INFORM 'GAG FLAG))
THE ORIGINAL DO FORMAT - (DO X XINIT XSTEPPER ENDTEST DOBODY) - 
IS STILL APPLICABLE, AND FOR THE NEXT FEW WEEKS, THE COMPLR WILL NOT
HANDLE THE NEW MULTIPLE FORMAT.
*********** THIRD DO FORMAT INSTALLED 10/15/73 *********



BACKTRACE NOW WORKS MUCH BETTER, AND OMITS ALL THAT GARBAGE, OFTEN 
SEEN WHEN AN ERROR OCCURS, ABOUT THE *RSET EXPR.  THE FORMAT IS ALSO 
A LITTLE DIFFERENT IN THAT AN ENTRY TO FUNCTION FOO WILL BE PRINTED 
OUT AS  FOO←  AND IF BAR IS CALLING FUNCTION FOO, THE PRINT-OUT WILL 
BE  FOO←BAR. IN GENERAL, PROGS AND CONDS ARE NO LONGER LISTED TWICE 
FOR EACH ENTRY.  
	REMINDER!   BACKTRACE IS NOT AUTOMATICALLY INVOKED UPON
AN ERROR, SO THE BEST WAY TO USE IT IS TO HAVE THE *RSET SWITCH SET 
TO T, AND WHEN AN ERROR OCCURS, DO (BAKTRACE).  IF YOUR ERROR IS 
BEING CAUGHT AN STOPPED BY AN ERRSET, TRY SETTING USER INTERRUPT 
NUMBER 4, WHICH  WILL BE EXECUTED JUST AS AN ERROR
IS BEING CAUGHT BY AN ERRSET.  TYPICAL USAGE WOULD BE

	(SSTATUS INTERR 4 '(LAMBDA (FOO) (BREAK ERSTBREAK T)))


SPEAKING OF USER INTERRUPTS, NUMBER 9. WILL SERVICE A WRONG NUMBER OF
ARGUMENTS CAUGHT BY THE INTERPRETER.(CONTRARY TO A PREVIOUS NOTE, THE
FUNCTION CALLED WHEN AN ERROR CAUSES RESTORATION TO TOP LEVEL, I.E.,
THE *RSET FUNCTION, IS STORED IN INTERRUPT NUMBER 19.)  AS ARGUMENT
IT WILL BE HANDED A TWO-LIST INDICATING THE FUNCTION ABOUT TO BE 
APPLIED AND THE  ARGUMENTS ACTUALLY PASSED ALONG, AND THE LAMBDA LIST
OF THE FUNCTION. FOR EXAMPLE ((FOO V1 V2 ) (X Y Z)) SHOWS THAT FOO
WAS BEING CALLED AND THE VALUES [REPEAT! VALUES] OF THE ARGUMENTS 
TO FOO WERE V1 AND V2; ALSO, THE LAMBDA LIST OF FOO IS (X Y Z) 
[CURRENTLY, THE INTERPRETER DOES NOT CATCH CALLS TO SUBRS WHERE THE
NUMBER OF  ARGUMENTS IS WRONG].  SINCE A TYPICAL SERVICE FUNCTION 
MIGHT BE (LAMBDA (ARGLOSS) (BREAK WNA T)), THE USER, AFTER INSPECTING
ARGLOSS, MIGHT TYPE
	(RETURN '((FOO 'V1 'V2 35.)))
REMEMBERING THAT BREAK, UPON READING A RETURN, WILL ITSELF  RETURN 
THAT VALUE.   AS BEFORE, IF THE SERVICE FUNCTION RETURNS A NON-NIL 
VALUE, IT IS PRESUMED TO BE A LIST OF THE CORRECTED FORM; IN THIS 
CASE, THE EVALUATION OF (FOO . . .) WILL BE RESTARTED AND REPLACED 
BY (FOO 'V1 'V2 35.)


	THE FAMOUS PSEUDO VIDISSECTOR IS WORKING WELL, AND IS 
INITIALIZED BY (SSTATUS FTV FN1 FN2 DEV USR), IN ORDER TO USE THAT
FILE OF CANNED VIDI SCENES.  NVFIX AND NVID WILL THEN OBTAIN THEIR 
VALUES FROM THERE RATHER THAN FROM THE REAL VIDISSECTOR.  GIVING
NVFIX A NEGATIVE FIRST ARGUMENT WILL ALLOW ACCESS OF CERTAIN HEADER
INFORMATION STORED WITH THE PICTURE ARRAY, THE SECOND ARGUMENT 
SPECIFYING WHICH:
	(NVFIX -1 0)  =>  (XLL . YLL)
	(NVFIX -1 1)  =>  (XUR . YUR)
	(NVFIX -1 2)  =>  (DCO . CONF)
 ASK JERRY LERMAN FOR MORE INFORMATION IF YOU ARE INTERESTED.


	TYPEP IS A NEW SUBR THAT RETURNS ONE OF  
		LIST FIXNUM FLONUM BIGNUM PNAME RANDOM
DEPENDING UPON WHAT THE TYPE OF THE ARGUMENT IS; NIL IS OF TYPE PNAME
AS WELL AS TYPE LIST, SO IT IS ARBITRARILY GIVEN TYPE PNAME HERE; ANY
DOTTED PAIR, AND NOT JUST PROPER LISTS, IS GIVEN VALUE LIST.

	MAKNUM IS NOW AN LSUBR, WITH (MAKNUM FOO) BEING EQUIVALENT 
TO (MAKNUM FOO 'FIXNUM)

	(SSTATUS DIVOV T) WILL ENABLE A DIVIDE OVERFLO IN THE 
FUNCTION QUOTIENT  TO RETURN THE  NUMERATOR WITH ITS MAGNITUDE 
INCREASED BY ONE (RATHER THAN CREATING AN ARITHMETIC OVERFLOW ERROR).



	MORE REMINDERS OF THINGS ALREADY KNOWN:
(1) IF AN ITEM IN A LIST TO MAKNAM OR READLIST IS A NUMBER INSTEAD OF
    A PNAME-TYPE ATOM, IT IS TREATED AS THE SINGLE CHARACTER ATOM 
    WHOSE ASCII CHARACTER VALUE IS THAT NUMBER.  THUS 
    (READLIST '(101 102)) RETURNS  AB  .
(2) INFINITE PRECISION FIXNUM ARITHMETIC WORKS WELL IN BNLISP - SOME 
    HAVE SUGGESTED MAKING THIS THE STANDARD LISP.  IF ANYONE OBJECTS 
    TO THE EXTRA BLOCK OF PURE CODE THAT THIS WOULD REQUIRE, OR TO
    THE LOSS OF ERROR MESSAGES ON ARITHMETIC OVERFLOWS, OR TO THE 
    EPSILON TIME LOSS REQUIRED FOR ADDITIONAL INTERPRETATION, PLEASE
    LEAVE ME A NOTE [DO :MAIL JONL I OBJECT ETC.<CONTROL-C>]
    PERHAPS IT IS REDUNDANT TO SAY, BUT CODE COMPILED BY THE UPCOMING
    FAST-NUMBER COMPILER WILL NOT MAKE USE OF THE INFINITE PRECISION 
    SUBROUTINES. INSTEAD WE AIM ONLY FOR ONE-HALF FORTRAN SPEED ON 
    FORTRAN-LIKE PROBLEMS ENCODED IN MACLISP.


	PLANS FOR THE FUTURE: SUPER-FAST ARRAY ACCESSING, LIKE 
FORTRAN ALMOST, AND THE EXTENSION OF THE FAST-NUMBER COMPLR TO HANDLE
THEM.  A COMPATIBLE VERSION OF MACLISP [EXCEPT FOR UNUSUAL I/O 
DEVICES] LIVES ON THE BBN TENEX SYSTEM;  SOME GROUP AT UNIV. OF MICH.
HAS IMPLEMENTED A MACLISP ON A 360.  WORK IS AFOOT TO OBTAIN A 
COMPATIBLE MACLISP ON MULTICS [THEY SAY, TOO, THAT WORK IS AFOOT TO 
MAKE MULTICS COMPATIBLE WITH REAL TIME]. THE VERSION RUNNING ON THE 
MATHLAB SYSTEM MAY BE THE FIRST TO HAVE A DYNAMICALLY EXPANDABLE FREE
STORAGE, BUT THIS IS MANY MONTHS IN THE FUTURE.


 











	IN ORDER TO USE THE SLAVE, IT IS NECESSARY TO HAVE AVAILABLE
THE PDP6.  SOON WE WILL HAVE A VERSION THAT WILL ALSO RUN ON THE 10 
UNDER ITS, AT PERHAPS SOME DEGRADATION IN PERFORMANCE (BOTH OF THE 
SLAVE AND ITS).  THE PDP6 SHOULD BE IN THE RUNNING STATE, AND IF 
SIMPLY HITTING THE START SWITCH DOESN'T KEEP THE RUN LIGHT ON, 
DEPOSIT ZEROS INTO LOCATIONS 40 AND 41 AND START UP AT 40
THE REMAINDER OF THIS DESCRIPTION OF LISP FUNCTIONS FOR THE NEW
PDP6 DISPLAY SLAVE USES THE FOLLOWING CONVENTIONS:
	X, Y	ARE ASSUMED TO BE INTEGER ARGUMENTS TO LINE DRAWING,
		POINT INSERTING, AND OTHER SUCH FUNCTIONS
	N	IS A FIXED-POINT NUMERICAL ARGUMENT DESCRIBED
		UNDER PARTICULAR FUNCTIONS
	ITEM 	IS ASSUMED TO BE THE NUMERICAL INDEX OF SOME
		DISPLAY SLAVE ITEM.  IT IS A QUANTITY SUCH AS IS 
		RETURNED BY DISCREATE.
	BRITE	EACH ITEM HAS A BRIGHTNESS LEVEL ASSOCIATED WITH IT, 
		RANGEING BETWEEN 1 AND 8.  DEFAULT VALUE = 8.
	SCALE	EACH ITEM HAS A SCALE, OR MAGNIFICATION, FACTOR 
		ASSOCIATED WITH IT, RANGEING BETWEEN 1 AND 4.
		DEFAULT, AND NORMAL, IS 1; 2 DOUBLES THE LENGTH OF 
		DRAWN LINES AND TEXT, 3 QUADRUPLES AND 4 MULTIPLYS 
		BY 8.  TEXT LOOKS MUCH NICER IF IT IS DRAWN WITH A 
		LITTLE MAGNIFICATION; GENERALLY 2 IS APPROPRIATE.
	FLAG	IS AN INDICATOR TELLING WHETHER A GIVEN ACTION
		IS TO BE DONE [ON NON-NIL] OR UNDONE
	BSL	IS EITHER NIL, IN WHICH CASE THERE IS NO CHANGE, OR 
		IS A LIST LIKE (BRITE SCALE) INDICATING A SETTING OF
		LEVELS FOR A GIVEN ACTION
	121.	A WELL-KNOWN INTEGER, EASILY RECOGNIZED TO BE THE 
		SQUARE OF THE FIFTH PRIME, BUT NOT SO EASILY SEEN 
		AS SUCH WHEN EXPRESSED IN OCTAL AS 171 - THUS WE USE
		OCTAL NOTATION EXCEPT WHEN THE STRING OF DIGITS IS 
		FOLLOWED BY A .
EACH ITEM HAS ASSOCIATED WITH IT VARIABLES DETERMINING
THE BRIGHTNESS, SCALE, AND VISIBILITY OF POINT AND LINE INSERTION
REQUESTS; LIKE THE LOGO TURTLE, WE THINK OF THE ITEM AS HAVING A PEN
WHICH CAN BE "DOWN" SO THAT A LINE IS VISIBLE WHEN THE TURTLE IS 
REQUESTED TO GO FROM ONE PLACE TO ANOTHER, OR "UP" SO THAT NO MARK
IS SEEN.  FOR THE COMMANDS TO AFFECT BRIGHTNESS, SCALE, OR THE PENUP
STATUS, 0 GENERALLY MEANS NO CHANGE.  COMMANDS WHICH TAKE AN 
OPTIONAL BSL ARGUMENT - NAMELY DISAPOINT, DISCUSS, AND DISALINE -
WILL TREAT IT AS A TEMPORARY SETTING FOR THESE VALUES, AND UPON EXIT
WILL RESTORE THESE VARIABLES TO THEIR VALUES PRIOR TO THE CALL.
SIMILARLY, THE OPTIONAL PENUP ARGUMENT TO DISALINE IS TREATED
AS TEMPORARY.
	ARGUMENTS THAT ARE INTENDED TO SPECIFY LOCATIONS
ON THE 340 SCREEN FOR THE FUNCTIONS DISALINE, DISAPOINT, AND DISCUSS,
ARE INTERPRETED IN ONE OF FOUR WAYS DEPENDING ON THE SETTING OF 
THE SLAVE VARIABLE "ASTATE":
	0	RELATIVE MODE - THE POINT SPECIFIED IS IN RELATION TO
		THE HOME OF THE ITEM ON WHICH THE COMMAND IS ACTING.
	1	ABSOLUTE MODE - X AND Y ARE DIRECTLY INTERPRETED IN 
		THE CO-ORDINATES OF THE 340 SCREEN, MOD 1024., WITH 
		THE LOWER-LEFT CORNER BEING [0,0]
	2	INCREMENTAL MODE - THE POINT SPECIFIED IS IN RELATION
		TO THE CURRENT POSITION OF THE PEN OF THE ITEM ON
		WHICH THE COMMAND IS ACTING.

	3	POLAR MODE - LIKE INCREMENTAL, BUT THE ARGUMENTS, 
		WHICH MUST BE FLOATING POINT, ARE CONSIDERED AS THE 
		RADIUS AND ANGLE FOR A POLAR COORDINATE SYSTEM 
		CENTERED ABOUT THE CURRENT PENPOSITION (WITH ZERO 
		DEGREES BEING HORIZONTAL TO THE RIGHT).
TO EMPHASIZE THE ASTATE MAPPING OF THESE ARGUMENTS, WE WILL WRITE 
ASTATE[X,Y] TO MEAN THE POINT SPECIFIED BY X AND Y.
N.B.: FUNCTIONS LIKE DISCREATE, DISLOCATE, AND DISMOTION, WHICH 
PLACE FOR AN ITEM'S HOME IN SOME SPECIFIED LOCATION, ALWAYS INTERPRET
THE SPECIFICATION IN ABSOLUTE MODE.





TYPICAL CALLS	FUNCTION TYPE	EXPLANATION

(DISCREATE X Y)	      LSUBR	CREATE A DISPLAY ITEM WITH HOME AT 
(DISCREATE)			[X,Y] ON THE 340 SCREEN. DEFAULT
				OPTION IS TO PLACE HOME AT [0,0]
				IF X AND Y NOT GIVEN.  RETURNS
				ITEM NUMBER OF NEWLY CREATED ITEM.

(DISINI)	      LSUBR	SEIZE AND INITIALIZE SLAVE.  IF USER 
				ALREADY HAS SLAVE, THEN REINITIALIZE,
				AND SET ASTATE TO GIVEN ARGUMENT.  
				ALWAYS RETURNS PREVIOUS VALUE OF 
				ASTATE, BUT NO ARG GIVEN, OR ARG NOT
				AMONG 0,1,2,3 MAKES NO CHANGE IN 
				ASTATE.  INITIAL ASTATE = 0.

(DISPLAY ITEM FLAG)   SUBR	ITEM ON OR OFF DISPLAY - I.E. MAKE
				VISIBLE ON SCREEN OR NOT.  DISCREATE,
				DISCOPY, AND DISGOBBLE PLACE THEIR
				ITEMS ON DISPLAY, EVEN WHEN NULL. 
				WHEN OFF DISPLAY, THE ITEM IS STILL
				REMEMBERED BY THE SLAVE UNTIL FLUSHED

(DISFLUSH)	      LSUBR	NO ARG GIVEN MEANS FLUSH WHOLE SLAVE
(DISFLUSH ITEM1 . . . ITEMN)	OTHERWISE SIMPLY KILL ITEMS.

(DISLOCATE ITEM X Y)  SUBR	MOVE ITEM'S HOME TO LOCATION [X,Y]

(DISBLINK ITEM FLAG)  SUBR	SELF EXPLANATORY

(DISCOPY ITEM)	      SUBR	MAKE A COPY OF ITEM, AS A NEW ITEM 
				WITH HOME AT SAME LOCATION. RETURN
				NEW ITEM NUMBER.

(DISMARK ITEM N)      SUBR	IF N=0, REMOVE MARKER FROM ITEM.
				IF N<0, INSERT STANDARD MARKER
				IF N> , USE ITEM WITH #N AS MARKER

(DISCRIBE ITEM)	      SUBR	GET LIST OF (XHOME,YHOME,XPENPOS,
				YPENPOS,BRITE,SCALE,PENUP,MARKER) 
				FROM ITEM

(DISCHANGE ITEM BRITE SCALE)
		      SUBR	BRITE AND SCALE ARE INCREMENTS TO
				BE ADDED TO THE PARTS OF ITEM

(DISLINK ITEM1 ITEM2 FLAG)
		      SUBR	LINK OR UNLINK ITEM1 TO ITEM2
				ITEM2 IS THE "INFERIOR" OF ITEM1,
				AND WILL BE DISLOCATED, DCHANGED, 
				DISBLINKED, AND DISPLAYED AS A 
				SUBPART OF ITEM1 WHENEVER THESE 
				OPERATIONS ARE PERFORMED ON ITEM1.

(DISLIST)	      LSUBR	RETURN LIST OF ALL ITEMS ON DISPLAY
(DISLIST ITEM)	      		RETURN LIST OF ALL INFERIORS OF ITEM

(DISET ITEM N BSL)    SUBR	SETS THE DEFAULT VALUES FOR PENUP, 
				BIRGHTNESS, AND SCALE PARAMETERS FOR
				THE ITEM. IF N IS -1, PUT PEN DOWN;
				IF +1, LIFT UP PEN; IF 0, LEAVE PEN 
				ALONE. SET BRITE AND SCALE FROM BSL
				[FOR MEANING OF BSL, SEE CONVENTIONS
				DISCUSSED ABOVE]  WHEN CREATED, THE 
				ITEM'S DEFAULTS ARE: PEN IS DOWN, 
				BRIGHTNESS IS 8., AND SCALE IS 1.

(DISALINE ITEM X Y)
(DISALINE ITEM X Y N)
(DISALINE ITEM X Y BSL)
(DISALINE ITEM X Y BSL N)
		     LSUBR	SET PENUP AND BSL AS INDICATED BY
				N AND BSL (SEE DISET ABOVE), THEN GO 
				FROM CURRENT PEN POSITION TO 
				ASTATE[X,Y], LEAVING A VISIBLE LINE 
				ONLY IF THE PEN IS DOWN, AND THEN 
				RESTORE THE PENUP AND BSL PARAMETERS

(DISAPOINT ITEM X Y)
(DISAPOINT ITEM X Y BSL)
		     LSUBR	DISPLAY A POINT AT ASTATE[X,Y]. DOES
				AFFECT ITEM'S PENUP OR BSL PARAMETERS

(DISCUSS ITEM X Y TEXT)
(DISCUSS ITEM X Y TEXT BSL)
		     LSUBR	THE CHARACTERS OF THE VALUE OF TEXT 
				ARE INSERTED, AS IF PRINC'ED, INTO 
				THE INTO ITEM BEGINNING AT POINT 
				ASTATE[X,Y]. NO CHANGE IN ITEM'S
				PENUP AND BSL PARAMETERS.

(DISMOTION ITEM X Y SPD)
			SUBR	CAUSES ITEM TO BE SLOWLY DISLOCATED 
				SO THAT IT'S HOME IS AT [X,Y].  IF 
				EITHER X OR Y IS NEGATIVE THEN PLACES
				ITEM UNDER CONTROL OF SPACE WAR 
				CONSOLE 1.  THE BUTTON RETURNS 
				CONTROL TO THE TTY. SPD IS AN INVERSE
				MEASURE OF THE SPEED AT WHICH THE 
				ITEM WILL MOVE.  SPD = 0 IS MAXIMUM.
				NOTE WELL: ALTHOUGH THE SPACE-WAR 
				CONSOLE CONTROL WILL WORK FOR ANY 
				DISPLAY ITEM, THE AUTOMATIC SLOW 
				MOTION WILL CURRENTLY WORK ONLY FOR 
				ITEMS CONSISTING SOLELY OF LINES 
				DRAWN BY DISALINE.

(DISGORGE ITEM)		SUBR	CREATES A (GENSYM'D) LISP ARRAY AND 
				FILLS IT WITH THE 340 CODE FROM ITEM.

(DISGOBBLE ARRAYNAM)	SUBR	TAKES THE ENTRIES OF THE LISP ARRAY 
				ARRAYNAM AND CREATES A DISPLAY SLAVE 
				ITEM WITH THOSE ENTRIES.






	EXAMPLES 

A SUBROUTINE TO DRAW A LIGHT BOX WITH A MEDIUM POINT INSIDE IT AT 
THE CENTER OF THE SCREEN, RETURNING A DESCRIPTION OF THE SLAVE ITEM:

  ((LAMBDA (OASTATE B)
	(DISALINE B -100 -100 1)	;GO TO LOWER-LEFT CORNER
	(DISET B 0 (LIST 3 BOXSCL))	;GLOBAL VARIABLE FOR SCALE, 
					;NO CHANGE TO PENUP STATUS
	(DISALINE B 0 200)
	(DISALINE B 200 0)		;SEE HOW EASY IT IS IN 
	(DISALINE B 0 -200)		;INCREMENTAL MODE!
	(DISALINE B -200 0)
	(DISINI 0)			;BUT EASIER TO PUT IN POINT
	(DISAPOINT B 0 0 '(6 0))		;IN RELATIVE MODE.  NOTE THAT
					;SCALE IS NOT USED HERE
	(DISINI OASTATE)		;RESTORE ASTATE
	(DISCRIBE B))
  (DISINI 2)  (DISCREATE 1000 1000))	;CREATES B, HOME AT CENTER


TO ADD SOME TEXT ON THE TOP OF THE BOX, ASSUMING ASTATE=0 AND THAT
B'S VALUE IS THE NUMBER OF THE ABOVE ITEM:

    (DISCUSS B -200 207 '(HERE IS THE BOX - SEE THE BOX) '(6 2))


TO MOVE THE BOX B RIGHT 100 UNITS:

    (SETQ FOO (DISCRIBE B))
    (SETQ FOO (LIST (CAR FOO) (CADR FOO)))
    (DISLOCATE B (+ 100 (CAR FOO)) (CADR FOO))

TO PUT A CROSS WHERE THE PEN IS NOW, AND SOME TEXT WHERE IT USED TO 
BE BEFORE THE MOVE:

    (DISMARK B -1)
    (DISCUSS B (CADDR FOO) (CADDDR FOO) '(TURTLE SLEPT HERE))


TO BRIGHTEN UP THE BOX AND POINT [BUT THE TEXT "(TURTLE SLEPT HERE)" 
WAS ALREADY IN BRIGHTEST MODE, SO IT REMAINS UNCHANGED]:

    (DISCHANGE B 2 0)

TO FLUSH THE BOX:  (DISFLUSH B)
TO FLUSH ALL ITEMS ON THE LIST L:  (APPLY 'DISFLUSH L)
TO GIVE UP THE SLAVE: (DISFLUSH)

	

11/4/71   - JONL -

**** THERE ARE SOME NEW FUNCTIONS IN BOTH LISP AND NLISP.
     EXPLODEN IS LIKE EXPLODEC, EXCEPT THAT THE LIST OF ITEMS
	PRODUCED  CONTAINS THE ASCII VALUES [AS FIXED-POINT NUMBERS]
	OF THE EXPLODED PARTS, INSTEAD OF SINGLE CHARACTER OBJECTS.
     PLUSP OPERATES SIMILARLY TO MINUSP.
     IF A RETURN IS EXECUTED AT THE TOP LEVEL OF A BREAK,
	[SEE PRIOR NOTES ON BREAK LOOPS] THEN THE BREAK WILL EXIT
	RETURNING THE GIVEN VALUE RATHER THAN THE DEFAULT VALUE
	AS DESCRIBED IN PRIOR NOTES.
     WHILE TYPING IN FROM A JOB CONSOLE OF THE DISPLAY TYPE, YOU MAY
	HAVE NOTICED THAT TYPING CONTROL-L CLEARS THE SCREEN AND
	RETYPES THE CURRENT TTY INPUT BUFFER.  YOU MAY NOW USE
	CONTROL-K TO MERELY DO A CARRIAGE-RETURN-LINE-FEED FOLLOWED
	BY A RETYPING OF THE TTY INPUT BUFFER.  

**** CONTRARY TO WHAT YOU MAY HAVE HEARD, THE LISP FUNCTION
     SET IS BACK WITH US AS AN ORDINARY OLD SUBR OF TWO ARGUMENTS.
     SETQ HAS ALWAYS BEEN AN FSUBR, AND HAS BEEN RECENTLY ACCEPTING
     MULTIPLE REQUESTS LIKE (SETQ A 1 B 2 C 3).  CODE COMPILED FOR
     FUNCTIONS USING SET WILL NOT BE AFFECTED BY THIS CHANGE.


**** IRA, JERRY LERMAN, AND I ARE DEVELOPING A SIMPLE, NEAT
	DISPLAY LANGUAGE FOR USE IN LISP.  WE ENVISION USING
	THE PDP6 AS AN OFF-LINE DISPLAY PROCESSOR SO THAT ONE
	MAY OBTAIN HIGH-QUALITY IMAGES WITHOUT SLOWING DOWN THE 
	TIME-SHARING SYSTEM.  A PDP-10 ON-LINE VERSION OF THE
	PROCESSOR WILL BE USED WHEN THE 6 IS NOT AVAILABLE 
	[FOR COMPATIBILITY], BUT OF COURSE THIS WILL CAUSE SOME
	DEGRADATION OF THE ITS PERFORMANCE.  PERSONS WITH EITHER
	EXPERIENCE DESCRIBING VISUAL SCENES, DISPLAYS, GRAPHS, ETC.,
	OR WITH STRONG IDEAS ON HOW TO DO SO EASILY, SHOULD SPEAK
	WITH US SOON.

**** THE GOODIES ABOUT THE GARBAGE COLLECTOR MENTIONED IN THE LAST 
	UPDATE NOTE [REGARDING INTERRUPT NUMBER 10. FOR CATCHING 
	STORAGE SPACE CAPACITY EXCEEDED ERRORS] APPLIES TO LISP 
	AS WELL AS NLISP.


**** SOME BUGS IN THE BIGNUMBER INPUT ROUTINES HAVE BEEN
	REPAIRED, AS WELL AS SOME ANNOYING BUGS IN THE FLOATING-POINT
	PRINTOUT ROUTINE OF NLISP.




9/5/71    - RMS -

***** THIS FACILITY, AND THESE FUNCTIONS, EXIST ONLY IN THE VERSION 
	OF MACLISP CURRENTLY CALLED "NLISP" AND ARE NOT STANDARD YET 
	[AS OF DECEMBER 1972]

CHANGES TO NLISP I-O:

CONTENTS:
	FILES, AND HOW TO OPEN THEM
	SELECTION FOR INPUT
	ENABLING FOR OUTPUT
	NEW LPT OUTPUT FORMAT
	EOF HANDLING
	NEW STATUS CALLS
	OTHER NEW FUNCTIONS
	OLD I-O FUNCTIONS
	INCOMPATIBILITIES

FILES, AND HOW TO OPEN THEM:

	A FILE IN LISP IS REFERRENCED THROUGH A FILE-ARRAY.
A FILE-ARRAY IS AN ATOM WITH A FILE PROPERTY OF A SPECIAL TYPE;
IT CONTAINS TWO FILENAMES, A DEVICE NAME, AND A SYSTEM NAME;
AN EOF FUNCTION RELEVANT ONLY TO INPUT;
AND A CHRCT AND A LINEL RELEVANT ONLY TO OUTPUT.
IT ALSO CONTAINS OTHER INTERNAL DATA.

	TO OPEN A FILE, USE THE LSUBRS OPENI AND OPENO,
FOR INPUT AND OUTPUT, RESPECTIVELY.
THEY WILL BE REFERRED TO COLLECTIVELY AS 'OPEN.

	OPEN CAN TAKE AN ATOMIC ARG, A LIST ARG, NEITHER, OR BOTH.
IF THERE IS NO ATOMIC ARG, OPEN WILL GENSYM ONE.
IF THE ATOM IS NOT A FILE-ARRAY, OPEN WILL MAKE IT ONE,
	AND PUT IN THE DEFAULT NAMES, LINEL, AND EOFFN.
IF THERE WAS A LIST ARG, THE NAMES IN IT WILL BE
	MERGED IN TO THOSE IN THE FILE-ARRAY.
THE RESULTING SET OF NAMES SPECIFIES THE FILE, WHICH IS THEN OPENED.
THE VALUE OF OPEN IS THE FILE-ARRAY.

EXAMPLES:
	(OPENI UREAD) RE-OPENS THE UREAD FILE, TO START AT THE
		 BEGINNING AGAIN. (SEE "OLD I-O FUNCTIONS")
	(SETQ Z (OPENI '(NEW CLAP COM))) OPENS COM:NEW CLAP
		IN A FILE-ARRAY WHICH OPEN CREATES, AND PUTS IT IN Z.
	(OPENI 'Z '(NEW CLAP COM)) MAKES Z A FILE-ARRAY,
		AND OPENS COM:NEW CLAP IN IT.

	IT IS ADVISABLE TO HAVE OPEN GENSYM ALL FILE-ARRAYS, SO
THAT THEY WILL BE UNINTERNED, AND THEREFORE SUBJECT TO GC; AND WILL
AUTOMATICALLY BE CLOSED ANG GO AWAY WHEN NO LONGER NEEDED.
THIS REQUIRES THAT EACH ONE BE PUT WHERE IT CAN BE FOUND WHEN
IT IS RETURNED BY OPEN (E.G. BY SETING A VARIABLE TO IT,
SELECTING OR ENABLING IT).
SELECTION FOR INPUT:

	SINCE THERE CAN BE SEVERAL FILES OPEN FOR INPUT AT ONCE,
AS WELL AS THE TTY, THERE EXISTS A SPECIAL MECHANISM FOR TELLING
LISP WHICH INPUT SOURCE TO READ FROM. LISP REMEMBERS:
	A CURRENTLY SELECTED INPUT SOURCE; AND
	A STACK, ACTUALLY IN THE FORM OF A LIST, OF PREVIOUSLY
	   SELECTED INPUT SOURCES WHICH HAVE BEEN PUSHED DOWN.
AN INPUT SOURCE IS EITHER A FILE-ARRAY OPEN FOR INPUT,
	OR NIL FOR THE TTY.

	INPUT SOURCES ARE SELECTED BY THE SUBRS INSEL AND INPUSH.
(INSEL X) SELECTS THE INPUT SOURCE X.
(INPUSH X), WHERE X IS AN INPUT SOURCE,PUSHES THE CURRENTLY
	SELECTED INPUT SOURCE ONTO THE SELECTION STACK-LIST,
	AND THEN SELECTS X.
(INPUSH 0) DOES NOTHING BUT RETURN THE CURRENTLY SELECTED SOURCE.
(INPUSH -1) POPS THE FIRST INPUT SOURCE OFF THE SPECIAL STACK,
	AND SELECTS IT.(INPUSH -2) DOES THAT TWICE, ETC.
(INPUSH 1) IS LIKE (INPUSH (INPUSH 0))
	(INPUSH 2) DOES THAT TWICE, ETC.
INSEL AND INPUSH ALWAYS RETURN THE INPUT SOURCE SELECTED
WHEN THEY EXIT.
ANY INPUSH OR INSEL THAT SELECTS THE TTY, EXCEPT (INPUSH 0),
TURNS OFF THE ↑Q SWITCH.

	IF THE ↑Q SWITCH IS SET, ALL ORDINARY LISP INPUT FUNCTIONS
TAKE THEIR INPUT FROM THE CURRENTLY SELECTED INPUT SOURCE.
	OTHERWISE, THEY READ FROM THE TTY, WHATEVER IS SELECTED.

ENABLING FOR OUTPUT:

	IF A FILE IS TO BE WRITTEN ON, IT MUST FIRST BE ENABLED.
LISP KEEPS RECORDS OF WHICH OUTPUT CHANNELS ARE ENABLED.
ANY SET OF OUTPUT CHANNELS MAY BE ENABLED AT ONCE.
(AN OUTPUT CHANNEL IS EITHER A FILE-ARRAY OPEN FOR OUTPUT,
	OR NIL FOR THE TTY)

	OUTPUT CHANNELS ARE ENABLED AND DISABLED WITH THE SUBR ENABLE.
(ENABLE X T) ENABLES OUTPUT CHANNEL X
(ENABLE X NIL) DISABLES IT
ENABLE RETURNS NON-NIL IFF THE OUTPUT CHANNEL IS ENABLED.
(ENABLEP X) RETURNS THE SAME THING.

	ALL ORDINARY LISP OUTPUT WILL GO TO ALL ENABLED FILE-ARRAYS
IFF THE ↑R SWITCH IS NON-NIL.
	OUTPUT WILL GO TO THE TTY IFF IT IS ENABLED.
	(NOTE: THE ENABLE SWITCH FOR THE TTY IS JUST (NULL ↑W))

	WHEN A FILE HAS BEEN COMPLETELY WRITTEN, IT MUST BE CLOSED
TO WRITE OUT THE LAST BUFFERFULL. IT IS ADVISABLE TO CLOSE
INPUT FILES ALSO, WHEN THEY ARE NO LONGER NEEDED.

(CLOSE X) CLOSES THE FILE-ARRAY X, AND RETURNS IT.
	IN CASE IT WAS OPEN FOR INPUT:
	X IS DELETED FROM THE SELECTION STACK, AND IF IT IS SELECTED,
	  (INPUSH -1) IS DONE TO DESELECT IT.
	IF X IS EQ TO UREAD, (SETQ UREAD NIL) IS DONE.
	SIMILAR FOR 'UWRITE, IN CASE WAS OPEN FOR OUTPUT.

CLOSING A FILE-ARRAY NOT OPEN HAS NO EFFECT.
CLOSING NIL IS AN ERROR.
NEW LINE PRINTER OUTPUT FORMAT:

TYPING CNTRL-B CAUSES OUTPUT TO THE LINE PRINTER AS FOLLOWS:
(IF THE LPT IS NOT AVAILABLE, OUTPUT WILL BE TO TPL INSTEAD,
AND "
SPOOLING LPT
" WILL BE PRINTED ON THE TTY IF IT (THE TTY) IS ENABLED)

	ALL S-EXPRESSIONS READ FROM THE TTY WILL BE PRINTED
ON THE LPT, PRECEDED BY "
    *	".
ORDINARY OUTPUT LINES WILL BE PRECEDED BY A TAB.
THUS, THE FOLLOWING ON THE TTY:
(PLUS 5 (REEADDAEAD))4
9

COULD CAUSE THE FOLLOWING ON THE LPT:

    *	(PLUS 5 (READ))
    *	4
	9

	THE LPT HAS NO FILE-ARRAY WHEN OPEN IN THIS MODE.
THE USUAL I-O FUNCTIONS WON'T WORK ON IT.
IT CAN BE DISABLED AND CLOSED ONLY BY TYPING ↑E (OR EVALLING
(IOC E), OF COURSE).
THE SAME CHRCT AND LINEL ARE USED FOR THE TTY AND LPT.

ORDINARY OUTPUT CAN BE DONE TO THE LPT BY OPENING IT NORMALLY.

EOF HANDLING:

	NORMALLY, EOF CAUSES THE SELECTED FILE TO BE CLOSED,
(AND THUS POPPED BY (INPUSH -1) WHICH CLOSE DOES).
IF WITHIN (READ), (READCH), ETC., READING WILL CONTINUE WITH THE
INPUT SOURCE WHICH IS THEN SELECTED.
IF WITHIN (READ X), (READCH X), ETC., READING WILL STOP 
AND X WILL BE RETURNED.

	OTHER ACTIONS CAN BE OBTAINED BY GIVING A FILE-ARRAY A
NON-NIL EOF FUNCTION. IF THAT IS DONE, THEN IF EOF OCCURS ON THAT
FILE, THE EOF FUNCTION WILL BE CALLED WITH ONE ARG, WHICH WILL
BE NIL IF THE READ, READCH ETC. IN PROGRESS HAD NO ARG,
(LIST ARG) IF IT HAD ONE (WITHIN (READ X) IT WOULD BE (LIST X)).
IF THE EOF FUNCTION RETURNS NIL, THE SELECTED INPUT SOURCE IS
  CLOSED, AND READING CONTINUES FROM THE SOURCE POPPED TO.
IF IT RETURNS T, READING WILL CONTINUE IMMEDIATELY.
  (FROM THE SOURCE THE EOF FUNCTION LEFT SELECTED)
OTHERWISE, THE SELECTED SOURCE WILL BE CLOSED,
  AND READ, READCH, ETC. WILL RETURN THE CAR OF WHAT THE
  EOF FUNCTION RETURNED.
NEW STATUS AND SSTATUS CALLS:

(STATUS ENABL)	RETURNS A LIST OF ALL ENABLED OUTPUT CHANNELS.
(SSTATUS ENABL X)	CAUSES ONLY THOSE OUTPUT CHANNELS IN THE LIST
		X TO BE ENABLED. RETURNS X.

THE FOLLOWING CALLS REFER TO THE DEFAULTS IF X IS NIL:

(STATUS FILE X)	WHERE X IS A FILE-ARRAY,
		RETURNS A LIST OF THE NAMES STORED IN X AS:
		(FN1 FN2 DEV SNAME).
(SSTATUS FILE X Y)	PUTS THE NAMES IN Y INTO THE FILE-ARRAY X.
		IF A NAME IN Y IS $$ (ALTMODE-ALTMODE),
		THE NAME IN X WON'T BE CHANGED.
(STATUS RFILE X) WHERE X IS A FILE ARRAY WHICH IS NOT OPEN,
		IS EQUIVALENT TO (STATUS FILE X).
		BUT, IF X IS OPEN, THE NAMES OF THE FILE ACTUALLY OPEN ARE RETURNED.
(SSTATUS RFILE X Y)	LIKE (SSTATUS FILE X Y),
		BUT RETURNS (STATUS RFILE X).
(STATUS EOFFN X)	RETURNS X'S EOF FUNCTION
(SSTATUS EOFFN X Y)	SETS X'S EOF FUNCTION TO Y, RETURNS Y.
(STATUS LINEL X)	RETURNS X'S LINEL.
		THE TTY ALWAYS USES THE DEFAULT LINEL.
(SSTATUS LINEL X Y)	SETS X'S LINEL TO Y, RETURNS Y.
		IF A LINEL IS 0, NO EXTRA CRLF'S WILL BE OUTPUT.
(STATUS CHRCT X)	RETURNS X'S CHRCT. THERE IS NO DEFAULT CHRCT;
		(STATUS CHRCT NIL) RETURNS THE TTY'S CHRCT.
(SSTATUS CHRCT X Y)	SETS X'S CHRCT.
		(SSTATUS CHRCT NIL Y)	SETS THE TTY'S CHRCT.
(STATUS CHNUM X)	RETURNS NON-NIL IFF X IS OPEN.
		(STATUS CHNUM NIL) IS NIL .

OTHER NEW FUNCTIONS:

RENAME  --  SUBR.
	(RENAME X Y), WHERE X IS A FILE-ARRAY, RENAMES THE FILE OPEN
	IN X, OR THE FILE WHOSE NAMES ARE IN X, AS THE NAMES IN Y.
	THE NEW NAMES ARE PUT IN X, WHICH IS RETURNED.
	NAMES IN Y WHICH ARE $$ ARE LEFT UNCHANGED.
	IF X ISN'T OPEN, DEVICE AND SNAME CAN COME FROM Y.
	IF X IS OPEN, ANY DEVICE OR SNAME IN Y IS IGNORED.

	IF X IS A LIST OF NAMES, THEY ARE PUT OVER THE DEFAULT NAMES
	TO GET THE NAMES OF THE FILE TO BE RENAMED AS THE NAMES IN Y.
	IN THIS CASE, Y IS RETURNED.

READFILE  --  LSUBR.
	(READFILE X) RETURNS (READ), DONE WITH X TEMPORARILY SELECTED.
	(READFILE Y X) IS SIMILAR, BUT RETURNS (READ Y).

MAKFIL  --  SUBR.
	(MAKFIL X) MAKES THE ATOM X INTO A FILE-ARRAY,
	AND RETURNS IT. THE DEFAULTS ARE PUT INTO IT.

TYI  --  IS NOW AN LSUBR. CAN TAKE 0 OR 1 ARG, LIKE READCH.
OLD I-O FUNCTIONS KEPT FOR COMPATIBILITY:
(WITH EQUIVALENT DEFINITIONS)

UREAD  --  FSUBR.  OPENS AND SELECTS FILE SPECIFIED IN GENSYMMED
	FILE-ARRAY, WHICH BECOMES VALUE OF ATOM 'UREAD.
	UPDATES DEFAULT NAMES.
  (LAMBDA (X)  (SSTATUS FILE NIL X)
	(SETQ UREAD (INSEL (OPENI X)))
	(STATUS CRUNIT))

UWRITE  --  FSUBR.  OPENS AND ENABLES FILE .LISP. OUTPUT ON SPECIFIED UNIT.
	USES GENSYMMED FILE-ARRAY, WHICH BECOMES VALUE OF 'UWRITE.
	UPDATES DEFAULT UNIT (DEVICE AN SNAME).
  (LAMBDA (X)  (SSTATUS CRUNIT X)
	(SETQ UWRITE (OPENO '(/.LISP/. OUTPUT)))
	(ENABLE UWRITE T)
	(STATUS CRUNIT))

UFILE  --  FSUBR. CLOSES UWRITE FILE WITH SPECIFIED NAMES.
	UPDATES DEFAULT FILENAMES.
	RETURNS UNIT WRITTEN ON.
  (LAMBDA (X)  (RENAME UWRITE X)
	(SSTATUS FILE NIL (STATUS FILE UWRITE))
	(CDDR (STATUS FILE (CLOSE UWRITE))))

UKILL  --  FSUBR.  DELETES SPECIFIED FILE. UPDATES DEFAULT NAMES.
  (LAMBDA (X) (SSTATUS FILE NIL X)
	(RENAME (STATUS FILE NIL) '/ )
	(STATUS CRUNIT))

CRUNIT  --  FSUBR. SETS DEFAULT UNIT. RETURNS NEW DEFAULT.
  (LAMBDA (X)  (SSTATUS FILE NIL (COONS $$ (CONS $$ X)))
	(STATUS CRUNIT))

OLD STATUS CALLS:

STATUS CRUNIT  --  RETURNS DEFAULT UNIT.
  (LAMBDA NIL (CDDR (STATUS FILE NIL)))

SSTATUS CRUNIT  --  EQUIVALENT TO CRUNIT.

STATUS UREAD  --  INDICATES WHETHER UREADING,
	GIVES NAME OF FILE BEING UREAD.
  (LAMBDA NIL (COND (UREAD (STATUS FILE UREAD))))

STATUS UWRITE  --  INDICATES WHETHER UWRITING,
	GIVES UNIT BEING UWRITTEN ON.
  (LAMBDA NIL (COND (UWRITE (CDDR (STATUS FILE UWRITE)))))

SSTATUS UREAD  --  EQUIVALENT TO UREAD.

SSTATUS UWRITE  --  EQUIVALENT TO UWRITE.
INCOMPATIBILITIES:

THE ATOMS CHRCT AND LINEL NO LONGER HAVE SPECIAL MEANINGS IN LISP.
  THERE IS NOTHING WHICH HAS EXACTLY THEIR MEANING.

THE DIS DEVICE	-- NO LONGER HAS SPECIAL FACILITIES IN LISP.
  IT CAN BE WRITTEN ON WITH OPENO, OF COURSE.
  CNTRL-N AND CNTRL-O NO LONGER DO ANYTHING. (NOR (IOC N))
  THE ATOM ↑N HAS NO SPECIAL MEANING.

UKILL	-- NO LONGER FLAPS TAPES.

*	-- IS NO LONGER PRINTED OUT AFTER ERRORS.

VIDI, VIDLIN, VIDLOG	-- HAVE BEEN FLUSHED.

8/30/71   - JONL - 

OH, HAPPY DAY!
LISP WILL NO LONGER GO AWAY
WHEN THE GARBAGE COLLECTOR UNDERFLOWETH.

INTERRUPT NUMBER TEN
WILL CATCH AS CATCH CAN
A LESS-THAN-MINIMAL AMOUNT OF STORETH.

(SSTATUS GCMIN '(MINFS
MINFXS MINFLS))
RESETS THE DEFAULT RATE

WICH COMES TO YOU
IN A LISP NEW
AT 100, 20, AND EIGHT.



A STATUS CALL CORRESPONDING TO GCMIN ALSO EXISTS, WHICH RETURNS A
LIST SHOWING THE DEFAULT RATES FOR, IN ORDER, THE FREE STORAGE AREA,
THE FIXNUM AREA, AND THE FLONUM AREA. IN ADDITION TO THE INTERRUPTION
CAUSED BY FAILURE TO COLLECT ENOUGH SPACE, THE USERS INTERRUPT 
SERVICE FUNCTION (AS WELL AS A *RSET ERROR CATCHING FUNCTION) CAN 
COUNT ON HAVING AT LEAST  THE MINIMAL AMOUNT OF FREE SPACE IN EACH 
STORE [BUT THIS DOES NOT APPLY RECURSIVELY TO UNDERFLOWS CAUSED BY 
THE SERVICE  FUNCTION.]  IN THE CASE OF THE SERVICE FUNCTION FOR 
INTERRUPT NUMBER TEN,  IT WILL BE GIVEN AS ARGUMENT THE ATOM LIST, 
FIXNUM, OR FLONUM ACCORDING TO WHICH SPACE UNDERFLOWED.


8/30/71   - ECR - 
	THERE IS A NEW  NLISP (LISP VERSIONS 234 AND HIGHER) WHICH SHOULD
BECOME THE SYSTEM LISP IN ABOUT A MONTH.  ITS MAIN NEW FEATURE IS UNIFORM
REPRESENTATION OFNUMBERS - THE INUM KLUDGE IS GONE.  THE PURPOSE OF
THIS CHANGE IS TO ALLOW THE COMPILER TO CONTAIN A FAST-ARITHMETIC
FEATURE.  THERE IS A NEW COMPILER, LISCOM VERSIONS 129 AND HIGHER, WHICH CAN
OPEN-CODE ARITHMETIC EXPRESSIONS.  SEE LISCOM NOTE.
	USERS SHOULD TAKE NOTE OF THE FOLLOWING , IN PREPARATION FOR THE
DAY THAT NLISP BECOMES LISP:
	  1-IN NLISP , TWO NUMBERS MAY NOT BE EQ EVEN IF THEY ARE EQUAL.  NEVER
USE EQ FOR NUMBERS.  USE EQUAL OR =. (SEE BELOW FOR AN EXPLANATION OF =.)
	  2-NLISP HAS A MULTIPLE I/O FEATURE.  SEE NOTE BY RMS
	  3-THE ONLY COMPILER PRESENTLY AVAILABLE FOR USE WITH NLISP IS
NLISCOM. OTHER VERSIONS OF THE COMPILER, NAMELY OLISCOM ,LISCOM ,
AND COMPLR WILL NOT PRODUCE CODE WHICH WILL RUN IN NLISP.
IT IS EXPECTED THAT NLISP-COMPATIBLE VERSION OF COMPLR WILL BE
AVAILABLE SHORTLY, BUT SINCE IT WON'T HAVE THE FAST-ARITHMETIC FEATURE,
IT WILL STILL BE A LOSER.
	  4-THERE ARE SOME NEW ARITHMETIC OPERATIORS IN NLISP. +,-,*,/,1+,1-,\, 
ARE LIKE PLUS,DIFFERENCE, TIMES, QUOTIENT, ADD1,SUB1,REMAINDER, EXCEPT THAT THEY
TAKE ONLY FIXNUM OPERANDS.  SIMILARLY, +$,-$,*$,/$,1+$,1-$,
TAKE ONLY FLONUM OPERANDS. (INCIDENTALLY, THESE ARE REAL DOLLAR SIGNS).
THOUGH THESE WILL RUN A BIT FASTER THAN THEIR MORE FAMILIAR COUNTERPARTS,
THEIR MAIN ADVANTAGE IS THAT THEY WILL ALWAYS BE OPEN-CODED BY THE
COMPILER.  THERE ARE ALSO THREE NEW SUBR'S, =,<,>.  THEY ARE LIKE 
EQUAL, LESSP, AND GREATERP, EXCEPT THAT THEIR OPERANDS MUST BE NUMBERS
OF THE SAME TYPE (BOTH FIXNUMS OR BOTH FLONUMS).  AGAIN, THESE FUNCTIONS WILL
ALWAYS BE OPEN-COMPILED.  HOWEVER, = IS A WINNER EVEN WHEN RUNNING
INTERPREIVELY, SINCE IT CAN BE EXPECTED TO RUN MUCH FASTER THAN EQUAL.
	  5-(ZEROP 0.0) NOW RETURNS T.
	  6-A POINTER ARITHMETIC SCHEME WILL SOON BE AVAILABLE IN NLISP
FOR THOSE LOSERS WHO FOOLISHLY INSIST ON CONSING TOGETHER LOTS OF
NUMBERS.
	7- WITH NLISP, ALWAYS USE COM:NEW LAP  OR COM:NEW CLAP FOR
	   THE PROPER VERSIONS OF E LAP AND C LAP.

8/11/71   - JONL - 

FOR SOME TIME THERE HAS BEEN A WINNING, BUT AS YET UNADVERTISED, 
FEATURE IN THE TRACE PACKAGE.  ONE MAY SPECIFY A TRACE OF THE 
FUNCTION FOO ONLY FOR THOSE CALLS TO FOO WHICH ARE DIRECTLY CALLED 
FROM THE FUNCTION BAR BY SAYING:
	(TRACE (FOO WHEREIN BAR . . .))
THE . . . TAKES THE PLACE OF THE REMAINDER OF THE TRACING 
SPECIFICATION, E.G. (TRACE (FOO WHEREIN BAR COND (NULL X) BOTH))
SUCH A TRACE IS REMOVED BY SAYING (UNTRACE (FOO WHEREIN BAR))
OR BY THE GENERAL UNTRACING  OF SAYING (UNTRACE).


SETQ NOW TAKES MULTIPLE PAIRS OF ARGUMENTS, AS IN
		(SETQ A 1 B 25 C A)
THE ORDER OF EVALUATION IS SEQUENTIAL AS IF SEVERAL SETQ
STATEMENTS HAD BEEN WRITTEN, SO THAT IN THE ABOVE EXAMPLE C WOULD
ALSO BE GIVEN THE VALUE 1.

INTERRUPT NUMBER 9 IN THE USER'S INTERUPT TABLE IS THE FUNCTION
CALLED WHEN AN ERROR CAUSES RESTORE TO TOP LEVEL [AND  *RSET = T] 
CURRENTLY IT IS (LAMBDA (*RSET) (IOG NIL (BREAK *RSET T)))
THUS THE USER CAN CHANGE THIS FUNCTION AT WILL, AS WELL AS THE 
↑H BREAK INTERRUPT FUNCTION [INTERRUPT NUMBER 1].

THREE MORE STATUS GOODIES ARE AVAILABLE: (STATUS GCTIM) RETURNS THE
TOTAL AMOUNT OF TIME (IN MICROSECONDS) SPEND IN GARBAGE COLLECTION.
(SSTATUS GCTIM V) WILL RESET THIS COUNTER TO THE VALUE OF V. 
(STATUS TTY) IS THE SAME AS THE VALUE OF THE TOP LEVEL VARIABLE TTY -
NAMELY NIL IF THE CURRENTLY ATTACHED CONSOLE IS A PRINTING
TELETYPE, AND NON-NIL IF A DISPLAY-TYPE TERMINAL. (SSTATUS TTY N1 N2)
HOWEVER, SETS THE TELETYPE WAKE-UP AND CONTROL CHARACTERISTICS FOR
CHARACTERS TYPED ON THE JOB CONSOLE. SEE JONL OR A SYSTEM HACKER FOR 
MORE INFORMATION AS TO WHAT THIS MEANS.  THERE IS A SIMULATED 
VIDISSECTOR AVAILABLE, WHOSE FEATURES HAVE YET TO BE SOLIDIFIED, 
BUT WHICH WILL BE SELECTED BY SOME SORT OF SSTATUS CALL SUCH AS 
(SSTATUS FTV T).

JUST A REMINDER OF A FEW LITTLE UNDERSTOOD POINTS OF THE CURRENT 
LISP: 		(BREAK IDENTIFIER PREDICATE) AND 
		(BREAK IDENTIFIER PREDICATE RETURNVALUE)
BOTH WILL "BREAK" IF PREDICATE EVALUATES TO NON-NIL [OFTEN ONE 
SIMPLY MAKES PREDICATE = T].  A "BREAK" CAUSES IDENTIFIER TO BE 
PRINTED OUT, TELETYPE INPUT AND OUTPUT TO BE SELECTED, AND AN
ERRSET-PROTECTED READ-EVAL-PRINT LOOP TO BE ENTERED. THE NORMAL
EXIT IS OBTAINED BY TYPING THE ATOM }P [NEEDS THREE STROKES OF
THE KEYBOARD - <ALTMODE><P><SPACE>]. TYPING ↑G WILL RESTORE TO THE 
TOP LEVEL OF LISP, BUT BECAUSE OF THE ERRSET PROTECTION, A ↑X WILL 
SIMPLY RESTART THE BREAKLOOP OVER AGAIN. THE VALUE OF A BREAK IS 
EITHER THE VALUE OF RETURNVALUE AS IN THE SECOND EXAMPLE ABOVE, 
OR ELSE NIL.
    IF ONE TYPES ↑G ANYTIME DURING THE ALLOCATION PHASE, THEN IT 
WILL BE RESTARTED; IF HE TYPES } <ALTMODE>, THEN IT WILL BE FORCED 
TO FINISH WITH THE REMAINING OPTIONS TAKEN FROM THE DEFAULT CASES.
NUMBERS TYPED DURING THE ALLOCATION PHASE ARE TAKEN BASE EIGHT 
UNLESS SUFFIXED BY A DECIMAL POINT, IN WHICH CASE THEY ARE BASE TEN.
IF ONE RESPONDS BY TYPING ↑Q OR ↑W AT THE REQUEST  "ALLOC?",
THEN HIS USER DISK FILE DIRECTORY IS SEARCHED FOR A FILE NAMED 
.LISP. (INIT)  
IF ONE EXISTS, IT IS OPENED AND THE ALLOCATION REQUESTS ARE TAKEN 
FROM THE FIRST S-EXPRESSION ON THE FILE, WHICH MUST BE OF THE 
FOLLOWIN FORMAT:
	(COMMENT CORE 34 FXS 1000 FLS 100 REGPDL 1400 
		 SPECPDL 1000 FXPDL 400 FLPDL 10 BPS 600)
NOT ALL OF THE QUANTITIES NEED BE TYPED, THE MISSING ONES BEING 
FILLED IN WITH THE DEFAULT VALUES.  AFTER ALLOCATION, THIS FILE 
STILL REMAINS OPEN FOR READING AND BECOMES THE SOURCE OF INPUT FOR 
THE TOP LEVEL READ-EVAL-PRINT LOOP.




THERE IS FINALLY A SUPER WINNING LISP COMPILER AVAILABLE AS 
SYS:TS COMPLR   
[OBTAINABLE BY TYPING COMPLR<CONTROL-K> OR :COMPLR<CR> AT DDT]
ITS VERSION NUMBER IS 200, AND WITH A FEW MINOR EXCEPTIONS IS USED
JUST LIKE THE PREVIOUS COMPLR [WHICH WAS UNFORTUNATELY LOST IN 
A DISK CRASH MANY MOONS AGO.]
LAP CODE COMPILED BY THE PREVIOUS COMPLR'S WILL PROBABLY NOT
WORK CORRECTLY IN LISP 226, AND THE OUTPUT OF THE CURRENT TS COMPLR
WILL NOT WORK CORRECTLY IN OLDER LISPS.
THE EXCEPTIONS TO BE NOTED FOR USING COMPLR 200 ARE:
    1) IF THE FUNCTION MAKLAP IS GIVEN ARGUMENTS, IT OPERATES JUST 
	LIKE THE FUNCTION COMFILE OF LISCOM [SEE LISCOM NOTE].
	OTHERWISE (MAKLAP) ENTERS A MODE AS DESCRIBED IN THE LISP
	ARCHIV DOCUMENTATION, TAKING A COMMAND STRING FROM THE TTY
	JUST AS MIDAS DOES.
    2) THE FOLLOWING FUNCTIONS ARE AVAILABLE TO MAKE DECLARATIONS 
	TO THE COMPILER: SPECIAL UNSPECIAL *EXPR *LEXPR *FEXPR 
			 GENPREFIX MACROS SYMBOLS
	A TYPICAL DECLARATION MIGHT LOOK LIKE
		(DECLARE (GENPREFIX PLNR) (SYMBOLS T) (MACROS T)
			 (SPECIAL LDLST) (UNSPECIAL X) 
			 (PRINT '(QUOTE (STUFF TO GO INTO LAP FILE)))
			 (READ) (COMMENT SWIPES THE NEXT S-EXPRESSION
					 SO THE COMPILER CANT GET IT))
	REMINDER: WHEN A FILE IS BEING COMPILED, NOTHING ON THE FILE
	IS EVAL'D EXCEPT THE ITEMS IN A DECLARE LIST.  FUNCTION 
	DEFINITIONS ARE COMPILED INTO LAP CODE, AND ALL OTHER 
	S-EXPRESSIONS ARE MERELY READ IN AND PRINTED OUT ON THE 
	OUTPUT FILE.


SYS:TS INDEX IS NOW A COMPILED VERSION OF THE PHAMOUS WINSTON
INDEXER [HOPEFULLY REPLETE WITH A COMPILED GRINDEFER TOO]
ALSO OBTAINABLE BY TYPING AT DDT INDEX<CONTROL-K> OR :INDEX<CR>



6/2/71   - JONL -
	THERE IS A NEW NLISP WHICH SHOULD BECOME THE SYSTEM LISP
WITHIN A FEW SHORT WEEKS.  NOTE WELL: ITEMS 1-4 BELOW DESCRIBE
CHANGES THAT ARE AT VARIANCE WITH THE DOCUMENTATION OF THE PREVIOUS
NLISP NOTE.

1)  *** DELETED ***

2) SIGNP IS NOW A FSUBR.  THE FIRST ITEM IN THE ARGLIST IS AN
INDICATOR FOR COMPARISON TO ZERO, E.G., (SIGNP LE N) IS NON-NIL
IF AND ONLY IF THE VALUE OF N IS A NUMBER LESS THAN OR EQUAL TO 
ZERO [SIGNP DOES NOT REQUIRE N TO BE OF NUMBER TYPE].  THE
INDICATORS FOLLOW THE PDP-10 ARITHMETIC COMPARISON INSTURCTIONS, AND
SHOULD BE SELF EXPLANATORY:  - L E LE A GE N G 

3) INTERRUPTING CONDITIONS WHICH THE USER MAY TRAP AND SERVICE WITH
EXPR CODE HAVE BEEN EXPANDED, AND MODIFIED SLIGHTLY.  IN ADDITION
TO THOSE MENTIONED IN THE LAST NOTE, ON CAN NOW TRAP OUT ON UNDEFINED
FUNCTION ERROR, UNBOUND VARIABLE ERROR, WRONG TYPE  OF ARGUMENT 
ERROR, AND MISSING PROG TAG ERROR.  IF THE USER'S SERVICE FUNCTION 
FOR THESE FOUR TRAPS RETURNS A NON-NIL VALUE, IT IS ASSUMED TO BE A
LIST OF THE CORRECTED ITEM.  THUS ONE MIGHT HAVE A FUNCTION
OF THIS NATURE RETURN '(0) WHENEVER NIL SHOWS UP AS AN
ARGUMENT TO PLUS [ETC].  ORDINARILY, ONE WOULD HAVE SUCH
FUNCTIONS REQUEST SOME CONSOLE INTERACTION WITH THE USER, PERHAPS
WITH THE FUNCTION BREAK, BUT ONE ANTICIPATED USE OF THE UNDEFINED 
FUNCTION TRAP IS TO SEARCH A FILE FOR A DEFINITION FOR THE FUNCTION 
AND LOAD IT IN IF FOUND.
	NOTE WELL: THE WAY IN  WHICH INTERRUPT FUNCTIONS ARE 
SPECIFIED HAS CHANGED.  DISREGARD THE DESCRIPTION IN THE PREVIOUS 
NOTE.  TO SET A FUNCTION F [WHICH MUST BE A FUNCTION OF ONE ARGUMENT]
TO SERVICE INTERRUPT NUMBER N, DO (SSTATUS INTERRUPT N 'F) .  THE 
INTERRUPT CONDITIONS WHICH THE USER MAY TRAP ARE:

      NUMBER	      MEANING
	1	<CONTROL>-H TYPED ON JOB CONSOLE - CURRENTLY PRESET 
		TO A SIMPLE BREAK BY THE SYSTEM.
	2	<CONTROL>-A TYPED ON JOB CONSOLE. NOT ALSO THAT
		THE VALUE OF THE ATOM ↑A IS CHANGED BY THE TYPING
		OF <CONTROL>-A REGARDLESS OF THE USER'S TRAP.
	3	ALARMCLOCK EXPIRATION.
	4	AN ERROR HAS OCCURRED WITHIN THE SCOPE ON AN ERRSET,
		AND THE ERRSET IS ABOUT TO RETURN A NIL. OTHERWISE,
		AN ERROR OCCURING UNDER AN ERRSET COMPUTATION WILL 
		NOT ACTIVATE THE USER'S TRAP, BUT SIMPLY CAUSE THE 
		ERRSET TO RETURN NIL.
	5	UNDEFINED FUNCTION.  
	6	UNBOUND VARIABLE.
	7	ARGUMENT NOT OF CORRECT TYPE.
	8	ATTEMPTED GO TO A NON-EXISTANT PROG TAG.

THE SERVICE FUNCTIONS FOR INTERRUPTS 1-4 CURRENTLY HAVE NIL GIVEN TO 
THEM AS ARGUMENT; BUT FOR INTERRUPTS 5-8 THE OFFENDING OBJECT IS 
PASSED ALONG AS ARGUMENT.  SUGGESTIONS FOR FURTHER REFINEMENTS OF 
THIS SCHEME ARE INVITED FROM THE USING COMMUNITY.

4) THE FUNCTION BAKGAG IS NO LONGER WITH US, AND THERE IS NO MORE
AUTOMATIC PRINT OUT OF A BACKTRACE WHEN AN ERROR OCCURS. HOWEVER, 
THE FUNCTIOPCKTRACE WILL STILL PRINT OUT A BACKTRACING, AND
THE FUNCTIION OF *RSET HAS BEEN EXPANDED TO INCLUDE THAT OF THE 
PREVIOUS BAKGAG:  WHENEVER A PROGRAM IS RUNNING IN *RSET MODE [SEE 
PREVIOUS NLISP NOTE], ADDITIONAL CRUFT IS STORED ON THE SYSTEM PDL 
SO THAT A (BAKTRACE) WILL BE WONDERFULLY CLEAR.

5) THERE IS A NEW FUNCTION: (EXPT X N) COMPUTES X TO THE NTH POWER,
WHERE N IS A FIXED-POINT NUMBER AND X IS ANY NUMBER. IT RUNS FASTLY.

6) SOME IMPORTANT REMINDERS!!
THE FOLLOWING ITEMS HAVE BEEN DOCUMENTED ELSEWHERE, BUT BECAUSE OF
THE PREVALENCE OF MISUNDERSTANDING ABOUT THEM, THEY ARE REPRODUCED
HERE.
  A)	(MAKOBLIST NIL) RETURNS A LIST OF LISTS, LIKE THE OLD STYLE
	OBLIST.  AN OBLIST IS NOT NORMALLY KEPT AROUND IN THE SYSTEM,
	BUT RATHER AN OBARRAY.  (MAKOBLIST 'NEWOB) WILL COPY THE 
	CURRENT OBARRAY AND ATTACH IT AS THE ARRAY PROPERTY OF THE 
	ATOM  NEWOB.  ONE CAN LAMBDA-BIND AND SETQ THE ATOM OBARRAY
	IN ORDER TO CHANGE OBARRAYS.
  B)	MAKNAM HAS NONE OF THE IDIOSYNCRATIC SYNTAX FEATURES OF THE 
	FUNCTION READ.  IT ALWAYS COMPRESSES A LIST OF CHARACTERS 
	INTO A NEW ATOM WHICH IS NOT INTERNED ON THE OBARRAY.
  C)	EXPLODE AND EXPLODEC ALWAYS BUT ALWAYS PRODUCE SINGLE 
	CHARACERT PNAME-TYPE ATOMS.  THUS (EXPLODEC 1.2) WOULD 
	PRINT OUT AS (/1 /. /2)  
  D)	IF ONE USES > WITH UREAD, AS IN (UREAD FOO >), THEN 
	(STATUS UREAD) WILL RETURN A LIST OF THE ACTUAL FILE NAMES 
	AND DEVICE WHICH WOULD PRINT OUT AS, SAY, (FOO /12 DSK JONL)
	BUT A SUBSEQUENT CALL TO UFILE WITH NO ARGUMENTS (UFILE) 
	WOULD CAUSE AN OPEN OUTPUT FILE TO BE FILED AWAY AS FOO 13
  E)	A MINOR GLITCH CONDITION HAS BEEN CORRECTED FOR SPLICING-TYPE
	READ MACROS; IF ONE IS ENCOUNTERED AT THE TOP-LEVEL READ 
	[RATHER THAN WHILE READING THE ELEMENTS OF A LIST] THEN ITS 
	VALUE IS IGNORED AND READ TRIES AGAIN.  HENCE SUSSMAN'S 
	SEMI-COLON MACRO WILL WORK AS DESIRED.



 5/15/71   -JONL-

LEAVE MAIL FOR JONL REGARDING BUGS.
BE SURE TO USE NEW LAP WITH NLISP!

	THE CASUAL USER MAY RE-ADJUST TO NLISP [LISPS WITH VERSION
NUMBER > 189] BY NOTING THE FOLLOWING QUICKIES:

1) THERE IS NO LONGER AN OBLIST, BUT RATHER AN INITIAL ARRAY
CALLED OBARRAY.  (MAKOBLIST NIL) PRODUCES AN OBLIST, AND
(MAKOBLIST 'NEW) MAKES AN ARRAY OUT OF NEW AND COPIES
THE CURRENT OBLIST INTO IT.

2) THE SUBR IOG HAS BEEN CONVERTED INTO AN  FSUBR WHICH WORKES SIMILAR
TO THE FOLLOWING:
(DEFUN IOG FEXPR (L)
    ((LAMBDA (↑W ↑Q ↑R ↑B ↑N) 
	(COND ((CAR L) (APPLY 'IOC L)))
	(EVAL (CADR L)))
      NIL NIL NIL NIL NIL))

3) IN CASE YOU HADN'T NOTICED, DO, LIKE PROG, RETURNS NIL AS
ITS DEFAULT VALUE.  PAGE 19 OF AI MEMO 190 [AN INTERIM LISP
USERS GUIDE] SHOWS THAT THE DEFAULT RETURN VALUE IS THE
VALUE OF THE INDEX UPON COMPLETION OF THE DO LOOP.  ALSO,
(STATUS MACRO C), IF NON-NIL, IS A 3-LIST CONTAINING IN ORDER
THE ASSOCIATED FUNCTION, S OR NIL FOR SPLICING OR NOT, D OR
NIL FOR DELAYED ACTION  OR NOT [SEE AI MEMO 190, PAGE C2].

#### THE FOLLOWING HAS BEEN SUPERSEDED BY ENTRY OF 3/22/73

4) THE ATOM * HAS AS TOP LEVEL VALUE THE VALUE OF THE LAST THING 
COMPUTED IN THE TOP LEVEL LOOOOP.  INITIALLY, BEFORE 
EVER ENTERING THE TOP  LEVEL IT HAS VALUE '*, THUS WHEN RESTARTING
BY }G ONE WILL SEE A RANDOM * PRINTED OUT.  THE PRESET PORTION
OF THE TOP-LEVEL ROUTINE IS DEFINABLE AS FOLLOWS:
(ERRSET	(PROG NIL
	    (SETQ ↑Q NIL ↑R NIL ↑W NIL ↑N NIL ↑B NIL)
	    (MAPC 'EVAL ERRLIST)
	  A (PRINT *)
	    (SETQ * (EVAL "TLF"))
	    (GO A))
	T)
"TLF" IS THE PORTION THAT THE  USER MAY CHANGE VIA SSTATUS,
AND IS ORDINARILY DEFINABLE AS: 
	(SSTATUS TOPLEVEL  '(EVAL (READ)))
BY WAY OF EXAMPLE, ONE COULD DEFINE EVALQUOTE THUSLY:
	(SSTATUS TOPLEVEL '(APPLY (READ) (READ))

###THE PRECEEDING HAS BEEN SUPERSEDED BY ENTRY OF 3/22/73


5) CERTAIN REAL-TIME INTERRUPTS MAY BE SERVICED
BY THE LISP USER WITH EXPR CODE.  MORE WILL BE SAID ABOUT THIS BELOW,
BUT FOR THE MOMENT, THE FOLLOWING GOODIE IS AVAILABLE AS A PRE-SET
INTERRUPT SERVICE: WHEN ↑H IS TYPED ON THE JOB COOONSOLE, THE STATE
OF THE WORLD IS SAVED, (BREAK ↑H T) IS EVAL'D, AND UPON EXIT FROM
THE BREAK THE STATE OF THE WORLD IS RESTORED.  THIS IS USEFUL IN
FIGURING OUT WHY A LONG COMPUTATION IS TAKING SO LOOOOONG, SINCE ONE
MAY INSPECT VALUES OF PROGRAM VARIABLES, CALL FOR A BAKTRACE, ETC.

6) *RSET NOW HAS A NEW FUNCTION IN LIFE!  IF NON-NIL, THEN  WHEN 
AN ERROR OCCURS, THE FORM (BREAK *RSET T) IS EVAL'D.  CURRENTLY, 
PROCEEDING FROM THE BREAK CAUSES THE POP BACK TO TOP LEVEL AS BEFORE,
BUT IN THE NEAR FUTURE, MANY ERRORS WILL REQUEST CORRECTIONS AND
PROCEED ACCORDINGLY.  SIMILARLY, MANY CONDITIONS NOW DEEMED
TO BE ERRORS WILL MERELY BE NOTES TO THE USER.

7) 	RE*ARRAY HAS BEEN FLUSHED - INSTEAD USE *REARRAY.
	*REARRAY IS THE SUBR VERSION OF WHAT  USED TO BE RE*ARRAY.
	*ARRAY IN THE LSUBR VERSION OR ARRAY.
	BAKTRACE HAS NO ARGUMENTS, AND CAUSES A BACKTRACEING 
		TO BE PRINTED OUT. USEFUL WHEN IN A BREAK LOOP.
		TO SEE ANYTHING USEFUL, HOWEVER, ONE SHOULD REMEMBER
		TO SET THE BAKGAG SWITCH TO NON-NIL BEFOREHAND.
		[THE SYSTEM SAVES EXTRA STUFF WHEN IN BAKGAG MODE]
	NREVERSE IS A NO-CONSING VERSION OF REVERSE - IT RPLACD'S
		EACH CELL IN THE LIST IN ORDER TO TURN IT AROUND.
	ROT IS LIKE LSH, (ROT N M) DOES M CYCLES OF A 36-BIT 
		LEFT-MOVING ROTATION ON THE NUMBER N.
	ASCII CREATES A SINGLE-CHARACTER ATOM WHOSE PNAME IS THE 
		CHAR WITH ASCII VALUE OF THE ARGUMENT. FOR EXAMPLE,
		(ASCII 70.)  IS THE ATOM F.
	RECLAIM GARBAGE-COLLECTS ITS FIRST ARGUMENT [EXCEPT FOR THE 
		PNAME-TYPE ATOMS IN IT].  IF ITS SECOND ARGUMENT IS
		NIL, IT RE-COLLECTS ONLY LIST CELLS [AND NOT FIXNUM 
		OR FLONUM CELLS].
********* SECOND ARG TO RECLAIM DIFFERENT - 10/15/73 ********
	(STATUS GCTIM) RETURNS THE TIME SPENT IN GARBAGE COLLECTION 
		IN MICROSECONDS AS A FIXED POINT NUMBER.
	(STATUS MACRO . . .) NOW RETURN A LIST OF ONE OR TWO
		THINGS - THE FIRST IS THE ASSOCIATED FUNCTION OF THE
		MACRO CHARACTER, AND OPTIONALLY THERE WILL BE
		THE ATOMIC SYMBOL SPLICING TO DENOTE A SPLICING MACRO.
  	(PURIFY LO HI T) PURIFYS THE PAGES FROM THAT ONE CONTAINING 
		THE ADDRESS LO UP TO [INCLUDING] THAT ONE CONTAINING 
		HI. SOMEDAY, A NIL 3RD ARG WILL SULLY THE PAGES [IE,
		DE-PURIFY THEM].

8) THE BINFORD EDITOR HAS BEEN IN LISP FOR SOME TIME, BUT WAS 
UNDOCUMENTED [EXCEPT BY WORD OF MOUTH.] FOR THOSE WHO HAVE ALREADY 
USED IT, NOTE THAT IT HAS BEEN CHANGED EVER SO SLIGHTLY IN LISP 190]
EVAL'ING (EDIT) ENTERS EDIT MODE, WHEREIN COMMANDS ARE GIVEN SIMILAR 
TO TECO COMMANDS, ACTION IS TAKEN ON SOME EXPRESSION CURRENTLY IN THE
WORKING SPACE,  AND A WINDOW AROUND THE POINTER IS PRINTED OUT AFTER
EVERY COMMAND EXECUTION.  (EDIT T) ENTERS EDIT MODE BUT DOES NOT 
TYPE OUT THE WINDOW AFTER EVERY COMMAND. [THE P COMMAND WILL CAUSE
PRINTING OF THE WINDOW - USEFUL WHEN AT A TELETYPE]. COMMANDS ARE:
	Q<SPACE> EXIT FROM THE EDITOR BACK TO LISP.
	Y<SPACE>ATOM<SAPCE> CAUSES THE FUNCTION PROPERTY OF ATOM TO 
		BE BROUGHT IN  FOR EDITING.
	YP<SPACE>ATOM<SPACE>PROP<SPACE> YANK IN THE PROP PROPERTY OF 
		THE ATOM ATOM.
	YP<SPACE>ATOM<SPACE> YANKS THE WHOLE PROPERTY LIST OF ATOM.
	J<SPACE> CAUSES THE POINTER [WHICH IS PRINTED OUT AS }}] TO 
		JUMP TO THE TOP OF THE WORKING EXPRESSION.
	S<SPACE>E1 . . . EN<SPACE>}}<SPACE> SEARCHES FOR AN OCCURENCE
		OF THE SEQUENCE OF S-EXPRESSIONS E1 . . . EN AND
		MOVES THE POINTER JUST TO THE RIGHT IF SUCCESSFUL.
		NOTE THAT THE LISP READER IS USED FOR READ-IN BY THE 
		EDITOR, SO THAT THE ATOM <ALTMODE><ALTMODE> MUST BE 
		FOLLOWED BY SOME ATOM TERMINATING CHARACTER 
		[SUCH AS <SPACE>].
	I<SPACE>E1 . . . EN<SPACE>}}<SPACE> INSERTS AT THE CURRENT 
		POINTER POSITION THE SEQUENCE E1 . . . EN
	K<SPACE> KILLS THE S-EXPRESSION JUST TO THE RIGHT OF THE 
		POINTER, AND SAVES IT AS THE VALUE OF THE ATOM }}.
	IV<SPACE>EXP INSERTS THE VALUE OF THE S-EXPRESSION EXP. 
		ESPECIALLY USEFUL WHEN INSERTING STUFF DELETED FROM 
		SOME PRIOR POINT.
	EV<SPACE>EXP MERELY EVALUATES EXP.
HENCEFORWARD, <SPACE> WILL NOT BE EXPLICITLY WRITTEN OUT, BUT WILL BE
UNDERSTOOD TO BE THE COMMAND TERMINATION CHARACTER. THE NEXT GROUP
OF COMMANDS ADMIT AN OPTIONAL NUMERIC ARGUMENT [BASE 10.], PRECEEDING
THE COMMAND, TO BE INTERPRETED AS A REPLICATION NUMBER:
	F MOVE FORWARD [RIGHTWARDS] PAST ONE TOKEN.  A TOKEN IS 
		EITHER A PARENTHESIS OR AN ATOM.
	C SAME AS F
	-B SAME AS F
	B MOVE BACK [LEFTWARDS] OVER ONE TOKEN.
	-C SAME AS B
	-F SAME AS B
	R MOVE RIGHTWARDS PAST THE NEXT S-EXPRESSION.
	L MOVE LEFT OVER ONE S-EXPRESSION.
	D MOVE "DOWN" INTO THE FIRST NON-ATOMIC S-EXPRESSION TO THE
		RIGHT OF THE POINTER.
	U MOVE "UP" OUT OF THE S-EXPRESSION CONTAINING THE POINTER.
	K KILL ALSO ADMITS A REPLICATION  NUMBER.
	PW ARG IS NOT REALLY A REPLICATION NUMBER,
		BUT RATHER THE "WINDOW WIDTH" IN NUMBER OF TOKENS.
THE FOLLOWING LITTLE USED COMMANDS MAY POSSIBLY BE OF SOME INTEREST:
	( INSERT A VIRTUAL OPEN PARENTHESIS.
	) INSERT A VIRTUAL CLOSE PARENTHESIS.
	D( VIRTUALLY DELETE AN OPEN PARENS
	D) VIRTUALLY DELETE A CLOSE PARENS
	() RESTRUCTURE THE WORKING S-EXPRESSION ACCORDING TO THE 
		VIRTUAL PARENTHESES AND DELETIONS.

9) THE PICPAC STUFF HAS BEEN DROPPED [PICARRAY, READPIC, WRITEPIC].  
ANYONE INTERESTED IN ITS REVIVAL SHOULD CONTACT JONL.

10) THAT OLD BUG IN PRINT HAS BEEN CHANGED; IE, IF "/" IS THE LAST
CHARACTER OUTPUTTD BEFORE AN INTERNALLYY GENERATED CARRIAGE RETURN,
THEN THE NEXT CHARACTER TO BE PRINTED IS SQUEEZED IN BEFORE THE CR.
THUS IT IS POSSIBLE TO HAVE LINEL+1 CHARACTERS APPEAR ON SOME LINE.

11) ANYONE HAND-CODING IN LAP WMUST TAKE NOTE THAT
THE FOLLOWING SYSTEM ROUITINES WHICH USED TO BE CALLED BY
A PUSHJ P, ARE NOW CALLED BY A JSP T,
	NUMVAL	FIX1A	FWCONS	FPCONS
FLOAT IS NOW CALLED IFLOAT, AND SIMILARLY THERE IS A LABEL IFIX.
FIX1A, IFLOAT, IFIX, FWCONS, AND FPCONS ALL TAKE THEIR
ARGUMENT IN ACUMULATOR TT INSTEAD OF A AS BEFORE; NUMVAL, IFLOAT,
AND IFIX PRODUCE THEIR RESULT IN ACCUMULATOR TT. THERE ARE LABELS  
FIX1 AND FIX2 IN THE FOLLOWING SEQUENCE:
	FIX2:	JSP T,IFIX
	FIX1:	JSP T,FIX1A
		POPJ P,
SIMILARLY, THERE ARE LABELS FLOAT2 AND FLOAT1.
 
12) MORE ON USER PROGRAMMABLE  INTERRUPTS: BY DOING A
(SSTATUS INTERRUPT N '(PRINT 'NOW/ IS/ THE/ TIME))
IN THE NTH ENTRY OF THE USER INTERUPT TABLE, THE FORM (PRINT . . .)
IS TO BE EVAL'ED. GENERALLY, IF NO SUCH DECLARATION HAS BEEN MADE, 
THEN THE INTERRUPT IS IGNORED.  CURRENTLY THERE ARE ONLY FOUR ENTRYS
IN THE USER INTERRUPT TABLE:
	1 ↑H TYPED ON JOB CONSOOOLE
	2 ↑A TYPED
	3 ALARMCLOCK TIMER EXPIRED
	4 AN ERROR OCCURED IN AN ERRSET COMPUTATION, AND ERRSET IS 
		ABOUT TO RETURN NIL BECAUSE OF IT.
 (ALARMCLOCK N) SETS THE ALARMCLOCK TIMER TO GO OFF [PROVIDE AN 
INTERRUPT] IN N MICROSECONDS [+- 5%]; (ALARMCLOCK NIL) TURNS OFF THE 
FOOL THING IN CASE IT HAD BEEN PREVIOUSLY SET.

9/24/69	-	JONL

	THE LONG-AWAITED "FAST" NUMBER SCHEME IS
IMPLEMENTED AND WILL MAKE ITS DEBUT IN THE NEXT NEW
LISP, PROBABLY TO BE NUMBER 120.  THE MAJOR NON-COMPATIBLE
CHANGE IS IN THE REPRESENTATION OF NUMBERS; NO LONGER
ARE THEY ATOMIC STRUCTURES IN FREESTORAGE WHOSE CDDR 
IS A POINTER INTO FULL WORD SPACE, BUT RATHER THEY
ARE POINTERS DIRECTLY INTO FULL WORD SPACE.  "INUM"S STILL
ARE USED FOR REPRESENTING INTEGERS LESS THAN ABOUT
5000., BUT THIS KLUDGE MAY GO AWAY IN FAVOR OF UNIFORMITY.
"ATOM" IS STILL TRUE FOR NUMBERS, AND FULL WORD SPACE IS
FURTHER SUBDIVIDED INTO A FIXNUM AREA AND A FLONUM AREA.
HOWEVER, ONE SHOULD NOT COUNT ON THIS DIVISION OF MEMORY
REMAINING FOR VERY LONG, SINCE I HAVE A PLAN TO INCORPORATE
ALL THREE AREAS INTO ONE HOMOGENEOUS SPACE WITH FULL WORDS
DISTINGUISHED BY SOME EXTRA BITS.  SINCE LAP USES SOME EXPR CODE
WHICH IS DEPENDENT ON THE REPRESENTATION OF NUMBERS, IT
WILL BE NECESSARY TO USE THE NEW LAP TO BE SUPPLIED AT THE
SAME TIME AS THE APPEARANCE OF LISP 120, PROBABLY THIS WILL
HAVE LAP NUMBER 17; IF THERE ARE ANY
OTHER PROGRAMS AROUND WHICH REALLY DEPEND ON THE INTERNAL
STRUCTURE OF BIG FIXNUMS OR FLONUMS, THEY WILL HAVE TO BE
MODIFIED.  BE PREPARED!
	ANOTHER INCOMPATIBLE CHANGE IS IN THE CALL TO PLOTLIST;
THE FIRST ARGUMENT IS NOT JUST AN ARRAYNAME, BUT A LIST OF
SPECIAL ARRAY CELLS, IDENTICAL TO THE FORM OF THE DISLIST.
THE SECOND  (OPTIONAL) ARGUMENT REMAINS UNAFFECTED.
THUS ONE COULD SAY "(PLOTLIST DISLIST)".  THE FUNCTION IPL
HAS GONE AWAY, AND IN FACT IS NO LONGER NEEDED.  THE SUBR
"PLOT" EXPECTS ITS ARGUMENT TO FOLLOW THE NEW SPECINER 
CONVENTION AS POSTED ABOVE THE PLOTTER MACHINE AND RECORDED IN
	DSK:MS;IPL DESC
THE SUBR "PLOTTEXT" HAS BEEN ADDED TO  PLOT THE CHARACTERS OF 
THE ARGUMENT AS THEY WOULD BE "PRINC"ED OUT.
	TWO NEW OPTIONS ARE AVAILABLE UNDER THE FUNCTION "STATUS" - 
(STATUS TIME) RETURNS A LIST OF THREE NUMBERS TO BE INTERPRETED
AS HOURS, MINUTES, AND SECONDS OF THE DAY'S TIME;
(STATUS DATE) RETURNS A 3-LIST OF THE YEAR, MONTH, 
AND DAY AS NUMBERS.  IN EACH CASE, IF ITS CANNOT
DETERMINE THE REQUIRED INFORMATION, NIL IS RETURNED.
	THE LSUBR "MACDMP" WILL ACCEPT A LITERAL ATOM
AS AN ARGUMENT, AND GIVE THE STRING OF CHARACTERS OF
ITS PNAME TO DDT TO BE EXECUTED AS A COMMAND STING.
IT WILL ALSO CAUSE A LOGOUT IF THE JOB IN
WHICH IT IS CALLED IS DISOWNED.  EXAMPLE:
	(MACDMP (QUOTE /}/_/.))
THREE FUNCTIONS HAVE BEEN ADDED TO THE LAP GROUP
IN ORDER TO FACILITATE COMMUNICATION WITH DDT:
"GETDDTSYM" RETURNS THE DDT SYMBOL TABLE VALUE
OF ITS ARGUMENT, "PUTDDTSYM" MAKES AN ENTRY INTO THE
DDT SYMBOL TABEL, AND "GETMIDASOP" DECODES A SYMBOL
AS AN OPERATION IF IT IS ONE.   "PUTDDTSYM" RETURNS T,
AND THE OTHERS RETURN NIL IF THEY FAIL. EXAMPLES:
	(GETDDTSYM (QUOTE LISPGO))
	(PUTDDTSYM  (QUOTE FOOBAR) 105)
	(GETMIDASOP (QUOTE HRRZ))

	THE S-EXPRESSION EDITING SYSTEM OF TOM BINFORD IS
NOW A REGULAR PART OF THE SYSTEM.  A MEMO SHOULD BE
COMING OUT SOON ON ITS USE; IT IS VERY MUCH LIKE
USING TECO WHILE IN LISP.

	A LOT OF MINOR GLITCHES HAVE BEEN REPAIRED,
BAKTRACE IS A LOT MORE MEANINGFUL, AND FEWER KINDS OF
ERRORS ARE IN THE "UNRECOVERABLE" CATEGORY WHICH CANNOT
BE ERRSET.  ALSO, LISP HAS BEEN PUT INTO PURE PROCEDURE
FORM SO THAT WHEN THE NEW PAGING SCHEME IS IMPLEMENTED IN 
THE HARDWARE, THERE WILL NEED TO BE ONLY ONE LISP SYSTEM
RESIDENT IN CORE, WITH EACH USER HAVING HIS PRIVATE MEMORY
FOR STORAGE CELLS AND FREESTORAGE.

7/6/69 22:16  JONL

	LISP 105 HAS THE LONG AWAITED NEW
READER, WHOSE MOST NOTABLE FEATURE IS 
CHARACTER-BY-CHARACTER RUBOUT FROM THE JOB
CONSOLE. RUBOUTS AND NON-SLASHIFIED CONTROL
CHARACTERS ARE IGNORED ON INPUT FROM TAPE OR
DISK;  SLASHIFIED CONTROL CHARACTERS TYPED ON
THE TTY HAVE NO CONTROL EFFECT [MAYBE!!!].   A
LIMITED  PROGRAMMABLE SYNTAX FEATURE IS AVAILABLE
FOR READ, TO BE DESCRIBED IN A FORTHCOMING 
COMPREHENSIVE DOCUMENT ON LISP IN GENERAL, 
AND PDP-6/10 LISP IN PARTICULAR.  ALL SYNTAX
PROPERTIES ARE UNDISTURBED IN THE STANDARD
LISP, EXCEPT THE CHARACTER <SINGLE-QUOTE>
WHICH HAS THE FOLLOWING FUNCTION:
	'SEXP
IN THE INPUT STRING, IS EQUIVALENT
TO THE APPEARANCE OF
	(QUOTE SEXP)
FOR ALL S-EXPRESSIONS SEXP.  SUCH FUNCTION
IS AN INSTANCE OF A MUCH MORE GENERAL SYNTAX
ABILITY, FOR THE PRESENT CALLED
"MACRO CHARACTERS".  NOTE ALSO
THAT THE OF-LATE-INFAMOUS SYNTAX PROPERTIES
OF THE CHARACTERS + AND - ARE RESCINDED 
UNLESS THE USER RE-INSTATES THEM BY MEANS OF
THE FUNCTION "SSTATUS" (SEE BELOW).  THE
USER MAY ALSO RESCIND THE MACRO PROPERTY OF 
<SINGLE-QUOTE> DESCRIBED ABOVE, OR DEFINE
SIMILAR PROPERTIES FOR OTHER CHARACTERS.

	THE FUNCTION "*REARRAY" EXISTS FOR 
THE PURPOSE OF RE-DEFINING THE SPACE OCCUPIED
BY AN ARRAY (OR EVEN ITS ACCESSING FUNCTION).
THE ARGUMENTS ARE GIVEN TO "*REARRAY" EXACTLY
AS TO "ARRAY", EXCEPT THAT *REARRAY IS AN LSUBR 
AND THE FIRST ARGUMENT IS EVALUATED.  ALSO, THE
FRIST ARG MUST HAVE ALREADY BEEN DECLARED AN ARRAY. 
IF ONLY THE ARRAY NAME IS GIVEN AS ARGUMENT, THEN
IT IS DIS-ARRAYED.

	THE ALLOCATOR NOW PRINTS OUT THE 
DEFAULT ALLOCATIONS WHEN ONE ASKS TO 
ALLOCATE.  FULL WORD SPACE IS ASSIGNED AN
AMOUNT EQUAL TO ABOUT 1/64TH OF THE AMOUNT
OF FREE STORAGE AVAILABLE; THEN ADDED TO
THIS IS THE NUMBER ASSOCIATED WITH ALLOC
TAG "FWS".  "PDL" IS THE TAG FOR THE REGULAR
PDL; "SPDL" IS FOR THE SPECIAL PDL.  EXCEPT 
IN THE MINI-LISP (NOT YET AVAILABLE) AND IN 
NON-TS LISP, THE  ALLOCATOR DOES NOT ASK FOR
"BPS" (BINARY PROGRAM SPACE) SINCE THIS AREA
IS SHARED WITH ARRAYS AND IS DYNAMICALLY 
HANDLED (SEE PREVIOUS DOCUMENTATION ON LISP
INFO REGARDING NEW IMPLEMENTATION OF ARRAYS
AND OF THE FUNCTION "RETSP").  ANY ATOM BREAK
CHARACTER WILL SUFFICE TO TERMINATE NUMBERS
TYPED AT THE ALLOCATOR, AND IF THE BREAKER
IS <DECIMAL-POINT>, THEN THE NUMBER IS
CONVERTED TO BASE TEN (RATHER THAN EIGHT).
TYPING <CONTRO-G> WILL CAUSE THE ALLOCATOR
TO RESTART.  A FEATURE HAS BEEN
IMPLEMENTED TO UTILIZE A KIND OF .LISP.
(INIT) FILE IN THE USERS DSK FILE DIRECTORY
BUT THE WHOLE STORY WILL HAVE TO WAIT UNTIL
THE NEXT BIG CHANGE IN LISP;  USERS WHO
MIGHT LIKE TO USE SOME SUCH FEATURE, PLEASE
SEE JONL.

      FUNCTIONS CALLED "STATUS" AND "SSTATUS"
ARE IMPLEMENTED TO AID IN QUERYING THE STATUS
OF CERTAIN SYSTEM  VARIABLES AND CONDITIONS,
AND IS CHANGING OR SETTING THOSE CONDITIONS.
A COMPLETE DESCRIPTION OF FACILITIES WILL 
APPEAR IN THE FORTHCOMING COMPREHENSIVE LISP
GUIDE - MANY FEATURES ARE NOT AVAILABLE IN 
ANY OTHER FASHION IN PREVIOUS LISPS, BUT SOME
ARE INTENDED MERELY TO STOP THE PROLIFERATION
OF ATOMS USED AS SYSTEM VARIABLES.

5/6/69 22:16  JONL

PDL OVERFLOWS AND FREE-STORAGE EXHAUSTION
  ARE NOW ERRSETABLE AND BAKGAGABLE.
SUBLIS WORKS WELL, AS PER PAGE 12. OF THE 
  LISP 1.5 PROGRAMMERS MANUAL.  IF THE
  FIRST ARGUMENT HAS MULTIPLE ENTRIES FOR THE
  SAME ATOM, THE ENTRY CLOSEST TO THE HEAD OF
  THE LIST WILL BE USED IN THE SUBSTITUTION.
  E.G., (SUBLIS (QUOTE ((A.B)(C.(D E))(A.F)))
		(QUOTE (X A Y C Z)))
  EVALS TO (X B Y (D E) Z).


4/25/69 JONL  1500PM

LISP 104 HAS TWO NEW FEATURES, DESCRIBED
BELOW, IN ADDITION TO CORRECTIONS FOR LONG 
LOST BUGS IN THE UUO HANDLER.

  APPLY HAS BEEN GENERALIZED TO WORK
FOR FSUBRS AND FEXPRS - (APPLY F L)
WILL DO THE SAME THING AS (EVAL (CONS F L))
IF F IS AN F-TYPE FUNCTION, AND WILL OPERATE
AS NORMAL IF F IS NOT F-TY
PE.
  SUBLIS AS DESCRIBED ON P.12 OF THE LISP 1.5
MANUAL HAS BEEN IMPLEMENTED.  IT COPYS ONLY
AS MUCH OF THE SUBSTITUTED-INTO S-EXPRESSION
AS IS NECESSARY TO PERFORM THE SUBSTITUTIONS.
IT ALSO UTILIZES A FEW TRICKS TO KEEP RUNNING
TIME VERY LOW.  IF WHAT ONE IS SUBSTITUTING
FOR IS AN ATOM, THEN SUBLIS IS PROBABLY A
BETTER FUNCTION TO USE THAN SUBST.  HOWEVER,
(SUBST NIL NIL L) IS STILL THE ONLY FAST WAY
TO COMPLETELY COPY THE S-EXPRESSION L.



3/1/69 JONL

 THE CURRENT VERSION OF LISP, "LISP 102", HAS
THE FOLLOWING AS-YET UNDOCUMENTED FEATURES:

	1)"DEFUN" IS AN FSUBR USED TO DEFINE
FUNCTIONS. EXAMPLES ARE
	(DEFUN ONECONS (X) (CONS 1 X))
WHICH IS EQUIVALENT TO 
	(DEFPROP ONECONS 
		(LAMBDA (X) (CONS 1 X)
	 EXPR)

AND (DEFUN SMASH FEXPR (L) (RPLACD L NIL))
 IS EQUIVALENT TO
	(DEFPROP SMASH 
		(LAMBDA (L) (RPLACD L NIL))
	 FEXPR)
THE NOVEL FEATURE OF "DEFUN" IS THAT ONE NEED
 NOT BE SO CONCERNED WITH BALANCING
PARENTHESES AT THE VERY END OF THE FUNCTION
DEFINITION, SINCE THE TYPE FLAG MAY BE 
OMITTED IF IT IS "EXPR", AND APPEARS NEAR 
THE FRONT OF THE "DEFUN" LIST IF IT IS SOME 
OTHER.  ALSO, THE "LAMBDA" NEED NOT BE 
DIRECTLY INSERTED.

	2)A FAST "DO" SIMILAR TO THE FORTRAN
DO FEATURE NOW EXISTS.  THE SYNTAX IS
	(DO ATOM INITIALVALUE STEPFUN ENDTEST
		STATEMENT1
		.
		.
		.
		STATEMENTN)
WHERE "ATOM" IS THE INDEX VARIABLE
OF THE LOOP, WHICH IS INITIALLY SET TO THE
EVALUATION OF "INITIALVALUE", AND IS RESET
EACH PASS THROUGH THE LOOP TO THE EVALUATION
OF "STEPFUN".  "STATEMENT1" TO "STATEMENTN"
COMPRISE A REGULAR PROG BODY (EXCEPTING THE
LIST OF PROG VARIABLES) WHICH IS EXECUTED
REPEATEDLY UNTIL "ENDTEST" EVALUATES TO 
NON-NIL.  FOR EXAMPLE,
  (DO I 0 (ADD1 I) (EQ I 400)
	(COND ((NULL (A I)) (GO B)))
	(PRINT (A I))
    B    (SETQ TOTAL (PLUS TOTAL (A I))))
************* THERE ARE TWO OTHER DO FORMATS NOW ALSO ******

	3) A PSEUDO-RANDOM NUMBER GENERATOR
CALLED "RANDOM" EXISTS AS A FUNCTION OF NO
ARGUMENTS. ITS RANDOMICITY WILL VARY AS TIME
GOES BY, AND AS VARIOUS RANDOM ALGORITHMS
ARE TRIED OUT. CURRENTLY IT IS SOME RANDOM
SHIFT REGISTER SEQUENCE.

	4)"CRUNIT" MAY BE USED TO OBTAIN
A LIST WHOSE FIRST MEMBER IS THE NAME OF 
THE MOST RECENTLY SELECTED USER-I/O-DEVICE,
AND WHOSE SECOND MEMBER IS THE CURRENT USER
SYSTEM NAME.  IF THERE ARE ARGUMENTS,
THE CURRENT DEVICE IS UPDATED IN EXACTLY
THE SAME MANNER AS WITH "UREAD", BUT THE
FILE IS NOT OPENED.  ONE SHOULD REVIEW 
PREVIOUS DOCUMENTATION ABOUT OMITTING 
ARGUMENTS OF UREAD,UWRITE AND UFILE.

	5) "GO" AND "RETURN" HAVE BEEN FIXED
TO OPERATE IN ACCORD WITH ONE'S INTUITION
ABOUT SUCH FUNCTIONS: THEY HAPPEN WHEN
EVALUATED BY THE INTERPRETER, AS OPPOSED TO
THE PREVIOUS RANDOM IMPLEMENTATION.  HENCE
THERE SHOULD BE NO DIFFERENCE BETWEEN
INTERPRETED CODE AND COMPILED CODE ON THIS
MATTER.

	6) "LAMBDA" HAS BEEN GENERALIZED
SUCH THAT "(LAMBDA (L) E1 E2 . . . EN)"
EVALUATES LIKE "(LAMBDA (L) (PROG NIL 
E1 E2 . . . (RETURN EN))"

	7) "ERRSET", WHEN GIVEN A SECOND
ARGUMENT, NOW WORKS AS SPECIFIED IN THE
LISP 1.5 PROGRAMMERS MANUAL, I.E. ERROR
COMMENTS ARE GIVEN ONLY IF THE SECOND ARG
EVALUATES TO NON-NIL.  WITHOUT THE SECOND
ARG, ERROR COMMENTS ARE ALWAYS PRINTED.